- Home /
Throwing knife doesn't throw correctly
Hello. I asked this question and didn't get any helpful answers, so I am testing my luck once more. Here is what I posted previously: I have a script to throw my knife forward, and do damage. But when I throw my knife it goes forward, as expected, but I am guessing that the forward isn't changing when I look up and down. For example, if I were to look upwards, it would still go straight, but not where I am looking. It just goes straight in front of my player, not my knife. Can someone help me so it throws correctly? Here is the section of my script that throws the knife: knifeSend.Play(); rb.isKinematic = false; rb.velocity = transform.forward * rbSpeed; yield return new WaitForSeconds(0.5f); FindClosestEnemy(); yield return new WaitForSeconds(0.1f); ReturnKnife();
Assu$$anonymous$$g this is a first person shooter, use your camera transform.forward ins$$anonymous$$d of your player's?
Yes, I have tried that, and it got the same effect. Any other suggestions?
Your answer
Follow this Question
Related Questions
Velocity Movement & Physics Interactions by Rigidbody2D 0 Answers
Problem Trying to Apply Non-Kinematic Velocity to Rigidbody 0 Answers
Inconsistent Rigidbody2D velocity. 0 Answers
Resume movement of instanced object relative to the original after instantiation. 2 Answers
What is the velocity on a given axis of a rigidbody? 2 Answers