- Home /
how to stop a player moving thought the walls in a 2d game
ım trying to make tank move in 2d plane . the tanks move on the x and z axis . the y axis is not used because its 2d. ı want the player object to move forward and rotate with horizontal keys . ı know many ways of doing this but the thing is ı don't want the object to go thought the other objects. rigidbody.moveposition stops them going thought but the player object moves in global position. ı just want it to move the direction of the rotation.
try using a character controller INSTEAD of a rigidbody
Answer by Meater6 · Mar 10, 2013 at 03:09 PM
Use rigidbody.velocity. Please look at the FAQ. There's also a video on how to use this site...
this time it will just go thought the object. ı need it to go forwarded the rotation the object facing without the object going through other objects. thanks for the video ım new here
I could tell. :/ You know your grammar/spelling really needs work. If English isn't your native language, use google translator. I'll understand much better, and so will the other folks. Sorry but I really don't understand what your your question is... Perhaps you don't have a collider on the wall?
Your answer
Follow this Question
Related Questions
Rigidbody.AddForce and incorrect rotation 2 Answers
Add Force to the right of the rigidbody, not right of the screen 1 Answer
Help with translation and rotation on a rigid body 2D 0 Answers
Stop A player Turning at Specific Point. 1 Answer
How to make a RigidBody not go into ground when tilted foward? 2 Answers