can i give a permanent upward acceleration to a box

For topics that don't fit under the other topics or forums.

can i give a permanent upward acceleration to a box

Postby navneeth » Thu Sep 28, 2017 10:30 pm

I am totally newbie here ... trying to find out whether algodoo will work for me.
Can i give a constant upward acceleration to a box in algodoo? If you can, please tell me how ...
Navneeth
navneeth
 
Posts: 1
Joined: Thu Sep 28, 2017 10:08 pm

Re: can i give a permanent upward acceleration to a box

Postby FRA32 » Fri Oct 27, 2017 7:36 pm

Sorry if my reply is a little late, I rarely check the forum.

You can apply permanent accelleration forces using thyme code. Since you are new, you may not understand the details, so here is a step by step tutorial on how to do it:

Right click your box and open the script menu(last option in the list)
go to the word postStep, it has the text (e)=>{}
Go inside the {} curly brackets and type in this line:
vel = vel + [0,*Write your accelleration value here*]/sim.frequency

This should be it. The code executes every simulation frame and adds a fraction of the accelleration force to the fraction of time(since algodoo calculates multiple times per second)
FRA32
 
Posts: 213
Joined: Wed Dec 03, 2014 9:51 pm


Return to Algodoo in general

Who is online

Users browsing this forum: No registered users and 2 guests

cron