Hello everyone! This time I have kind of big question.
I want to achieve one special effect in my 2D game. I have drawn a character and its arm:
I’d love to achieve kind of swinging effect of the arm. It should be connected to the body and swing according to (for example) the body’s speed (for example, when I run left after standing on place, the arm should rotate counterclockwise according to the First Newton’s Law, right?)…
So I want to create a hinge joint, but the HingeJoint2D component seems to be not very sophisticated (compared to HingeJoint)… Do you think it is even possible to achieve this via HingeJoint2D? I was experimenting with this, but no good result. Or is it better to write my own physics?
Thanks for any advice and, please, excuse my pretty lame English…
Have a nice day!
Well, for some reason, it does not work for me at all… Maybe I have set Anchor and Connected Anchor in a wrong way. If I have the sprite origin set to the “Top” (the anchor, basicly), should the Anchor be 0,0, or not? I’m not sure, but that does not work for me…
Well, a week ago I made this work, but I have one last problem. I connected the object “body” to object “wheel” via Hinge Joint 2D. But when I move with wheel, the body is not at it’s position, but there is a slight delay. The result is, the body is kind of flickering and tearing. Is that normal? I have been experimenting with settings for days, but no result. Any tips?
Well, solved… The problem was the body was a child of the wheel. I created a new game object a made body and wheel its children. Now I move with the new object and it works pretty well…