Browse Search Popular Register Upload Rules User list Login:
Search:
How to solve that problem (Question)?

Image:
screenshot of the scene

Author: Scientific Accuracy

Group: Default

Filesize: 65.73 kB

Date added: 2015-03-19

Rating: 5

Downloads: 456

Views: 479

Comments: 5

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:
question,
problem,
script,
scripting,
laser,
thruster,
science,
experiment,
newton

Scene tag

Hello @ everybody here.
My Question for that scene is:

How to do, that if the Laser (A) hits a Body like (B) the Force of the Thruster (C) changes from zero to 1 N - but just for the time of hitting the object - then changing back to zero ??? I would be very thankful for answers - especially for exact scripting-solutions!:) Hope someone could help me... PS.: it should not just work with the body-example B - it should work with every possible body. thank you!
Last edited at 2015/03/19 01:39:36 by Scientific Accuracy
Please log in to rate this scene
edit
Similar scenes
Title: Space-Time Problem + Solution!
Rating: 5.1111
Filesize: 0.8 MB
Downloads: 1659
Comments: 17
Ratings: 3
Date added: 2017/09/29 23:31:43
Made with: Algodoo v2.1.0
Rating: rated 5.1
download
Title: rolando boss (read description)
Rating: 5.4546
Filesize: 261.64 kB
Downloads: 1159
Comments: 9
Ratings: 5
Date added: 2009/03/28 11:19:01
Made with: Phun
Rating: rated 5.5
download
Title: my big question (inclueding ChaDomSom)
Rating: 5
Filesize: 20.38 kB
Downloads: 265
Comments: 14
Ratings: 1
Date added: 2016/03/18 02:32:56
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Race complex... PLEASE HELP!!
Rating: 5
Filesize: 109.32 kB
Downloads: 397
Comments: 5
Ratings: 1
Date added: 2010/04/18 18:50:06
Made with: Phun
Rating: rated 5
download
Title: Help me for Script!
Rating: 5
Filesize: 5.49 kB
Downloads: 448
Comments: 12
Ratings: 1
Date added: 2021/09/29 02:48:43
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: eval and onLaserHit
Rating: 5
Filesize: 440 B
Downloads: 170
Comments: 0
Ratings: 1
Date added: 2010/10/10 16:11:44
Made with: Phun
no image found for this scene
Rating: rated 5
download
Responses to this scene
show list
Title: Another Solution For Scientific Accuracy
Rating: 5.625
Filesize: 48.02 kB
Downloads: 573
Comments: 1
Ratings: 2
Date added: 2015/03/19 11:35:15
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: Solution For Scientific Accuracy
Rating: 5
Filesize: 31.51 kB
Downloads: 273
Comments: 5
Ratings: 1
Date added: 2015/03/19 04:09:02
Made with: Algodoo v2.1.0
Rating: rated 5
download
Questions for you:

1. Where is the example body labeled "B"? I don't see it.
2. What is the thruster used for? It's spinning around but I don't see what it is supposed to be thrusting.
3. When you say "it should work with every possible body", I assume you mean boxes, circles, and polygons. Right?

Maybe if you would give a brief overview of what this scene is about and what you expect it to do, it would help people to understand it better.

Thanks

EDIT: Forget my question #1. I had to zoom way out in order to finally find it! :lol:
Last edited at 2015/03/19 03:10:42 by Xray
what you could do is make two lasers and two boxes. the original box (from your scene) would have hitbylaser = { scene.my.thrust = 1 } with the laser on circle that hits it.

the second box would be somewhere off of the circle with the second laser constantly hitting it. that box would have hitbylaser = { scene.my.thrust = 0 }.

then make the force on ur thruster { scene.my.thrust }.

one thing you have to look out for when doing this is when u create it and set everything up youll have to delete one of the lasers and make another one (I think the laser on the circle). that makes it update after the other laser. otherwise the thruster would always be 0.

if u need me to show u with the scene I could do it.

good luck!
Last edited at 2015/03/19 03:05:00 by adrianp
Well, S.A., based on your description, it is a very simple thing to do. When laser hits an object, set thruster to 1.0. When laser is not hitting an object, then set thruster to zero. Sounds simple enough except for one important issue. Because of the high rate of rotation, you will encounter a stroboscopic effect on the laser. In other words, the laser is actually flashing on and off at a high rate, and the fast spinning can make it totally miss a target, or occasionally miss a target, especially if the target is far away. In order to have this work consistently, you will probably need to slow down the rotation speed by quite a lot.

EDIT: See my example scene for you.
Last edited at 2015/03/19 04:07:11 by Xray
Hey Xray - Answering your Questions: 1.: clear - 2.: that is still difficult to explain, but you will hopefully "see" the answer when my scene-experiment is done.
3.: Thats absolutely right - it should work independent from the bodies forms.

3.5.: Yes, but the complete "Project X" is a little secret until it is done;) Hope you can understand this... it will be finished very soon - but if you could hold a secret for you - I would contact you @ facebook ???
Hello adrianp:

Great Thanks for that scripting Idea! I will try it and if I need more help or have more questions - i will let you know it!:)