- Home /
Addforce use / question?
Hi,
I have a parent game object with a child that is connected with a unity hinge, I want use some kind of addforce option to make it sway to one side e.g. if I press the A key, I tried adding an object on each side with renderer turned off and applying force (on Y axis to go up?) to that but it does not work, even if I change the force values really high.. Are there any other ways I could achieve this , or has someone ever come across a sample that I might be able to review? I am looking for ideas or other ways to try this..any input would be appreciated.
Have you tried using transform.right * forceAmount to set the force angle?
Have you checked to make sure the joints themselves can act like ropes, not rebar construction? (able to jiggle vs still)
I have a feeling it's #2, but I've not used joints, so I can't say for sure.
Answer by AcE_fLoOdEr · Jan 21, 2015 at 09:49 PM
rigidBody.AddForce()
http://docs.unity3d.com/ScriptReference/Rigidbody.AddForce.html