Community Forum

Joint free rotation

Forum Overview >> Scripting

Created09.02.2015 10:44

Thomas Nagels (Unknown) 09.02.2015 10:57

I have a moving part which is controlled by the frontloader buttons. In my script I want the possibility to set the joint free, so that it can rotate freely.

Use case: I have a winch in my mod, and as soon as I attach this to another mod, I would like it to rotate freely and only be able to pull. As soon as it is released again, it's rotation should once again be controllable. This allows me to easily connect the winch, but it will also provide realistic behavior when connected.

Any hints on how to achieve this?

Emil Drefers (Unknown) 11.02.2015 11:54

how a movingPart can be used to simulate a winch makes me wonder.
A winch has a rope ... a movingPart is bar ... doesn't fit, I'ld say, but anyway ...

You can use a script to set the moving/rotating speed of a movingTool (~= movingPart) to zero.
This way it won't move when you move the mouse or press a key.

The rotation and translation limits of a joint can also be changed by script.

Now it's up to you how you combine these elements in the best way.


Note: Log in to post. Create a new account here.