Answer the question
In order to leave comments, you need to log in
How to make the character not pass through the object?
There is a character and tilemap on the wallpaper there are colliders, also rigidbody2d on the character Body Type Kenematic, on tilemap static
The code that I move the character
rb.MovePosition(rb.position + moveVelocity * Time.deltaTime);
Answer the question
In order to leave comments, you need to log in
Move Position is not for you, most likely. For 3d games, I recommend you the Character Controller and its Move method.
For 2D games, movement in RigidBody using velocity.
Move Position is a method that is not for character control and interaction with walls
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question