Ratchet 2.0
5 posts • Page 1 of 1
Ratchet 2.0
Another example of readable possibilities for scripting hinges/motors.
Code for ratchet (auto-brake is on):
p.s. Again - undo kills scripts in 2.0.1 hope it will be fixed.
Code for ratchet (auto-brake is on):
- Code: Select all
autoBrake = true;
motorTorque = {(readable(Scene.entityByGeomID((readable(owner)).geom0))).angvel > 0 ? 0 : +inf}
p.s. Again - undo kills scripts in 2.0.1 hope it will be fixed.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Ratchet 2.0
To change the direction in which the axle is able to turn change the > to < it took me a while to notice this.
Love this script. I think it should be an axle option.
Love this script. I think it should be an axle option.
- SodaJerk
- Posts: 8
- Joined: Mon Feb 08, 2010 4:40 am
Re: Ratchet 2.0
For correct work it needs second geom angvel check.
BTW, in 2.0.2 there is no need in "double" readable usage.
BTW, in 2.0.2 there is no need in "double" readable usage.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Ratchet 2.0
What do you mean by "second geom angvel check"? I'm new to Thyme scripting, can you please post the code. Thanks.
- SodaJerk
- Posts: 8
- Joined: Mon Feb 08, 2010 4:40 am
Re: Ratchet 2.0
SodaJerk wrote:What do you mean by "second geom angvel check"? I'm new to Thyme scripting, can you please post the code. Thanks.
Correct calculation is difference between geom0 and geom1 angvel.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests




