can i give a permanent upward acceleration to a box
2 posts • Page 1 of 1
can i give a permanent upward acceleration to a box
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
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
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)
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: 229
- Joined: Wed Dec 03, 2014 9:51 pm
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests