distinguishing between plane and geom

About advanced scenes, and the Thyme scripting language used in Algodoo.

distinguishing between plane and geom

Postby davidz40 » Wed Dec 30, 2009 6:49 pm

I'm working on homing gliding bomb that uses lasers to find target. But the lasers trigger as soon as they hit the ground plane. Is there any way to ignore this and trigger some script only when laser hits some geometry?
Phundamentalist
User avatar
davidz40
 
Posts: 438
Joined: Sun Sep 06, 2009 10:30 am

Re: distinguishing between plane and geom

Postby KarateBrot » Wed Dec 30, 2009 7:13 pm

This ignores planes and only activates the code if it's not a plane.
Code: Select all
e.geom + "" == "plane" ? { } : { laser code }

Or you can directly call any geometry type so it only gets activated if it hits circles or boxes etc... You got the idea.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: distinguishing between plane and geom

Postby davidz40 » Wed Dec 30, 2009 10:27 pm

thanks! :D
Phundamentalist
User avatar
davidz40
 
Posts: 438
Joined: Sun Sep 06, 2009 10:30 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest