Find Rotation of a Laser (Resolved)

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

Find Rotation of a Laser (Resolved)

Postby ddthj » Wed May 07, 2014 2:36 am

I am making a script that requires me to get the rotation (angle) of a laser once the laser hits an object with a specific color.

This is what I was trying to do
Code: Select all
(e)=>{
    [1.0, 0.0, 0.0, 1.0] == e.other.color ? {
        scene.my.angleT1 = e.rotation
    } : {}
}


It seems that no matter what I put in place for e.rotation, I cannot retrieve the rotation that the laser is currently at.

Is there a way to get the rotation angle of a laser? (from an if structure nested in the laser?)
Last edited by ddthj on Wed May 07, 2014 3:46 pm, edited 1 time in total.
ddthj
 
Posts: 26
Joined: Sat Sep 11, 2010 11:41 pm

Re: Find Rotation of a Laser (need help)

Postby Kilinich » Wed May 07, 2014 10:36 am

e.laser.rotation
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: Find Rotation of a Laser (need help)

Postby ddthj » Wed May 07, 2014 3:46 pm

Thanks! is there somewhere I can go to find all the e. commands? I searched the whole thyme forum but had no luck.
ddthj
 
Posts: 26
Joined: Sat Sep 11, 2010 11:41 pm

Re: Find Rotation of a Laser (need help)

Postby Kilinich » Wed May 07, 2014 10:23 pm

ddthj wrote:Thanks! is there somewhere I can go to find all the e. commands? I searched the whole thyme forum but had no luck.

here on forum)
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 22 guests