Question by
Adityaunity3d · Oct 05, 2016 at 11:27 PM ·
collisionphysicsrigidbody
How to make Player not through any Object when move?
when I try to move player walking , the Player always through any object , I'lltry to add Colliders but its not working
Here is My Code C#: void Update () {
if (Input.GetKey (KeyCode.W))
transform.Translate (Vector3.forward * WalkSpeed * Time.deltaTime);
Physics.minPenetrationForPenalty = 0.1F;
void OnCollisionStay(Collision collision) {
if (collision.rigidbody)
collision.rigidbody.AddForce(Vector3.up * 15);
My Component is : -Capsule Collider -Character Controller -Move.cs
Comment
Your answer
Follow this Question
Related Questions
Is there a way to limit animation on collision? 1 Answer
Why Does Bounciness Affects Rigidbody Velocity? (SOLVED) 0 Answers
How to make rigidbody not effect movement while still using it for collisions? 0 Answers
how to prevent a kinematic rigidbody from going through static colliders 0 Answers
Help with colliders on concave shapes with rigid bodies 0 Answers