- Home /
How to create a 1 directional spring?
How do i create a 1 directional spring(y axis, like a cars suspention)? I can't seem to restrict the spring joint from moving whatever direction it wants to..
I have played around with the configurable joint too, but even if i lock movement and rotation it still moves whatever direction it wants to. Looks like its bugging out and collapsing or something...
Any1 knows how to do this? Please tell me :)
Answer by DaveA · Apr 30, 2013 at 10:13 PM
There are 6 checkboxes for constraining springs, xyz movement and rotation. Just check all by Y movement.
In the spring joint there is no constraints, so i guess you are talking about the configurable..
Well, YES, that worked! :)
but now i have a new problem: I can not rotate the object "manually". I am trying to create a car suspention in the "real" way; with physics. But now i cant say "wheel.transform.rotation = 25" to make the wheel turn. The physisc ends up flipping out, and trying to turn the car, even if standing still makes it start to spinn arount and slide like there is no friction to the ground.
Any idea how i should do this? Have a 1D suspention, but on the same time be able to rotate the wheel in another axis?