Script to limit the rotation of a hinge?
4 posts • Page 1 of 1
Script to limit the rotation of a hinge?
I know you can limit the rotation using shapes to physically stop the rotation, but I want to know if there is a script to do it. I would like to rotate a wheel a set amount of degrees clockwise and counterclockwise. I've looked for a while and can't find anything.
- Holcomb
- Posts: 2
- Joined: Thu Nov 01, 2012 5:14 am
Re: Script to limit the rotation of a hinge?
set angvel = 0, or something like that.
I don't quite remember but;
Put this code in a laser or something in the onlaserhit script box.
or
I don't quite remember but;
Put this code in a laser or something in the onlaserhit script box.
- Code: Select all
e.other.angvel = 0
or
- Code: Select all
e.geom.angvel = 0
-

Nxdt - Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
Re: Script to limit the rotation of a hinge?
Thanks I'll try it out. I'm just hoping it wont set the rotation limit to the individual shape. I'd rather have the hinge limit the rotation so the entire object can still rotate freely.
- Holcomb
- Posts: 2
- Joined: Thu Nov 01, 2012 5:14 am
Re: Script to limit the rotation of a hinge?
not that easy
I've try to use script similar to my ratchet, it's not so effective. Hinge still moving ...
I've try to use script similar to my ratchet, it's not so effective. Hinge still moving ...
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
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests



