Laser Hit e.pos Question

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

Laser Hit e.pos Question

Postby fox11trot » Fri Oct 30, 2009 5:29 am

So i was experimenting with lasers and transparent boxes and stuff and i had a question about lasers.

Since lasers that go through transparent objects also register an onlaserhit with the transparent object, and the object that the laser hits through the transparent object, is there any way to read the e.pos of the multiple collisions or does it only record the e.pos of the nearest object?
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Laser Hit e.pos Question

Postby Nxdt » Fri Oct 30, 2009 10:40 pm

This would be intesreting, you certainly couldn't us ethe lasr to log the positions, but it might work if you script the objects it goes through to record teh colliosn positions.
User avatar
Nxdt
 
Posts: 1019
Joined: Mon Aug 31, 2009 6:32 pm
Location: Scotland!

Re: Laser Hit e.pos Question

Postby fox11trot » Sat Oct 31, 2009 4:25 am

ah i see what ur saying i like your idea

but i would still like to kno a was to read it from the laser if there is one
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Laser Hit e.pos Question

Postby standardtoaster » Sat Oct 31, 2009 4:32 am

Why not test this out yourself? It reads both positions, one right after the other. It reads the closest one first.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Laser Hit e.pos Question

Postby fox11trot » Sat Oct 31, 2009 4:57 am

hmm i did not know that

i just figured out a semi solution to this

you can make several transparent objects and then set, for example, the texturematrix(0) of each of the objects to a different number and then make a code in the laser that reads the position of each object depending on what texturematrix(0) it has
if that makes sense

EDIT: heres the scene

Rating: rated 5
Filesize: 24.22 kB
Comments: 0
Ratings: 1
download
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 7 guests

cron