- Home /
rb.AddForce-transform.right.. looks like teleporting how to fix??
hello im making a 3d platformer shooter game and i want to add force when my player is hit but the addforce doesn't work the way i want it to work i want it to be smooth not like teleporting and i want to add like the height and length but it dont really work so here is my addforce:
rb.AddForce(-transform.right * forceStrength, ForceMode.Impulse);
i really hope somebody can help :)
Answer by buiscreep55 · Jan 09, 2018 at 05:46 PM
Try using rb.AddForce(Vector3.right * forceStrength, ForceMode.Impulse); That will move the object to the right at least, or you could define your own vector to make it in a specific direction :)
thx for the help but it dont realy works how i want it it likes teleport to the right when i hit it but its not smooth but still thanks for the reply:)