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: 325

Views: 278

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: 1392
Comments: 17
Ratings: 3
Date added: 2017/09/29 23:31:43
Made with: Algodoo v2.1.0
Rating: rated 5.1
download
Title: my big question (inclueding ChaDomSom)
Rating: 5
Filesize: 20.38 kB
Downloads: 142
Comments: 14
Ratings: 1
Date added: 2016/03/18 02:32:56
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Help me to solve addFixJoint problem.
Rating: 5
Filesize: 26.3 kB
Downloads: 73
Comments: 2
Ratings: 1
Date added: 2018/02/06 08:27:53
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: My solution to adjustable size
Rating: 5
Filesize: 27.06 kB
Downloads: 444
Comments: 1
Ratings: 1
Date added: 2012/05/27 15:33:44
Made with: Algodoo v2.0.2 Edu
Rating: rated 5
download
Title: Wing experiment V2
Rating: 2.2727
Filesize: 1.26 kB
Downloads: 364
Comments: 2
Ratings: 11
Date added: 2008/09/09 18:30:13
Made with: Phun
Rating: rated 2.3
download
Title: Remote Controlled Car
Rating: 4.5
Filesize: 472.32 kB
Downloads: 530
Comments: 0
Ratings: 2
Date added: 2010/12/24 15:02:40
Made with: Phun
Rating: rated 4.5
download
Responses to this scene
show list
Title: Another Solution For Scientific Accuracy
Rating: 5.625
Filesize: 48.02 kB
Downloads: 471
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: 202
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!:)