How to get velocity as one number?

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

How to get velocity as one number?

Postby pnvv » Mon Dec 08, 2014 3:11 am

Sorry to be filling up this forum, but I have a non-facepalm-worthy Thyme question to ask all those who know more about Thyme than me.

My question is, how to get the velocity of an object to be one number, so it can be applied to say, a thruster. I ask this because I am trying to make a scripted "airplane" type thing which gathers more lift as speed increases, like an airfoil in real life.
Image

(/)(°,,,°)(/)
User avatar
pnvv
 
Posts: 670
Joined: Tue Aug 26, 2014 11:46 pm
Location: Disunited States of America

Re: How to get velocity as one number?

Postby Kilinich » Mon Dec 08, 2014 9:20 am

To calc speed from vel:
_speed = {math.vec.len(entity.vel)}

You could just copy-paste already working wings set.
Rating: rated 6.8
Filesize: 14.56 kB
Comments: 3
Ratings: 5
download
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: How to get velocity as one number?

Postby pnvv » Mon Dec 08, 2014 5:05 pm

Thanks so much, your a total boss at thyme :thumbup: :thumbup: :thumbup:
Image

(/)(°,,,°)(/)
User avatar
pnvv
 
Posts: 670
Joined: Tue Aug 26, 2014 11:46 pm
Location: Disunited States of America


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests