Page 1 of 1

can i give a permanent upward acceleration to a box

PostPosted: Thu Sep 28, 2017 10:30 pm
by navneeth
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

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

PostPosted: Fri Oct 27, 2017 7:36 pm
by FRA32
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)