- Home /
Translating a gameObject with a Hinge joint?
Hello,
I am having a problem in translating a gameObject with a character joint. The following is my set up:
An empty gameobject which is the parent to capsule segments with character joints except the top segment has a hinge joint. My hinge joint has no connected body to it. A picture is attached to show what I mean.(Its a rope)
Then in my script I have the following line:
Translate(0,Rate*Time.deltaTime,0,Space.Self);
I have done this on a lot of other game objects and it works perfectly fine, but none had a Hinge joint. When I apply the script to this specific case the gameobject jitters up and down as if something is preventing it from moving. In this case I think it is the Hinge joint. Note that all the capsules are rigid bodies. How can I solve this issue? If I cannot use translate for a hinge joint then what should I use?
Any help is appreciated.
Thank you very much.
You can use Translate() on the empty game object at the root. Look at the DragRigidbody.js script that comes with Unity (Assets/Import Package/Scripts) as an approach. You should be able to apply forces to the segments of the rope also.
Thanks for the reply,
I am using translate on the empty game object and it is not working. It just jitters. I also put another empty game object in the children and applied translate() to the parent empty game object and I see that only the empty game object child is translating the way I want while the other children are not. I do not want to add any forces here to, have any ideas?
Thank you.
Your answer
Follow this Question
Related Questions
2D hinge joint with sprite 0 Answers
jungle swing type game ...? 0 Answers
get a rigidbody rope move with my character 1 Answer
Creating a rope using skinned mesh renderer 1 Answer
Swinging too long HingleJoint 2 Answers