- Home /
how to create an extendable boxing glove on a spring?
Hi, Ive been at this all day and it won't behave in the right way.. i have a 2d game, and duplicates of a short metal joint, which I have criss crossed over and attached with hinge joints, to a kinematic base unit off the game screen, with a boxing glove sprite at the other end, I have managed to get the spring to behave properly in terms of it bouncing around gently and reacting to any bumps etc, but i need it to extend out, and then stop at a certain distance.. any ideas would be greatly appreciated as I'm running out of ideas... :)
Not an answer because I'm not sure if it will work, but have you tried applying a force to the boxing glove? If the boxing glove is attached to the rigidbodies of the metal bars, and the glove has a rigidbody itself, if you apply a strong force to it, I imagine it would behave the way you are expecting by pulling the spring part?
You might also want to investigate SpringJoint, unless you've already found it to not be suitable.
yes i did try that and it sort of worked but it didn't pull out far enough, so maybe i need to try to play with the limits of the hinge joints so it extends further.. is that possible?
Answer by ratboy · Apr 01, 2012 at 10:00 PM
silly mistake, i ended up using the limits on the hinge joints and increasing each max to 90 degrees, then adding springs through the middle.
Answer by reptilebeats · Mar 31, 2012 at 12:11 AM
qhat i would do is animate it all, then i suppose you could add randomness to it though different animation points. however i dont know what game your making
soo another way you could do it is just lock its position for a brief time at the point you want so when its so far out lock positions and then enable again or beter still make it kinematc instead quickly.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to swap sprites? 1 Answer
Help on a 2d game. 1 Answer
Best 2D plugin for my needs 0 Answers
Circular 9 slice? Draw a circle with constant thickness 1 Answer