- Home /
How do I add force To rigidbody based On Character's Walking direction?
So there's gonna be objects such as balls on the ground in my FPS style game. When the player walks and collides with them, the balls should be pushed. with some force.
My Character is character Controller and is not a rigidbody. so i have to add the force myself with scripting "addForce"
but yeah. how do i add force for the ball to go in the direction the player is facing?
Have you tried velocity? if (gameObject.collider.tag == "Player"){ rigidbody.velocity = GameObject.FindWithTag("Player").transform.forward; }
Your answer
Follow this Question
Related Questions
How to stop an rigidbody enemy from jumping when chasing the player? 1 Answer
RigidBody.MovePosition seems jerky in movement 0 Answers
need tutorials for rigidbody.Addforce 1 Answer
How to make rigidbodies on each side of a cube fall towards the cube? [multiple gravity / addForce] 0 Answers
Make a player jump tile 1 Answer