|
I have a 3-joint system with joints b1, b2, and b3 placed at 0.0, 0.5, and 1.0 along my object's Z axis, and they are free floating, not in a joint hierarchy. The object's origin is at the back end (in the same place as "b1.") Yes, they're all correctly oriented. I am trying to make the object deform as it goes around a corner. For the first half of stepTime, only the b3 joint is turning. For the second half, both the b3 joint and the b2 joint are turning and b1 is still moving forward. This is the code I have so far:
This doesn't work. Of course. I hit the turn key and... what is this I don't even. It deforms, but it's FUBAR. By comparison, this function works just fine:
(comments are locked)
|
|
Don't even use rotateAround, make an empty "pivot" GameObject, rotate that, and parent and unparent the joints to it as needed. Duh! (I wasn't aware originally that you could change an objects' parent with a script.)
(comments are locked)
|
