any way to read object velocity?

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

any way to read object velocity?

Postby Mr_Stabby » Fri Mar 12, 2010 8:10 pm

So i figured, before i go off reinventing the bicycle again with a bunch of lasers and boxes.. maybe there is an easy way to access velocity information via script?
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: any way to read object velocity?

Postby Mr_Stabby » Fri Mar 12, 2010 8:21 pm

too late!
Code: Select all
velz = (e.pos - [color(0), color(1)]) / (sim.time - color(2));     color = [e.pos(0), e.pos(1), sim.time, 0.6];
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests