Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Why is my character sliding? (Rigid Body)

$
0
0
Whatta finna pop? I have an issue with my game development. You see, I just created a movement script for my character. He is a rigid body object. He only has an empty with a camera parented to him. This is my script: void Update () { if (Input.GetKey("w")) { rb.AddForce(0, 0, 3000*Time.deltaTime); } if (Input.GetKey("s")) { rb.AddForce(0, 0, -3000*Time.deltaTime); } if (Input.GetKey("a")) { rb.AddForce(-3000*Time.deltaTime, 0, 0); } if (Input.GetKey("d")) { rb.AddForce(3000*Time.deltaTime, 0, 0); } } Again, my issue is that he just keeps on sliding! He slides a lot after I hit a key. What should I do?

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>