- Home /
How can I make walls with Collider2D components for a top-down game in Unity 2018?
This is a pretty basic request, or so I thought.
My goal was to make a simple top-down, orthographic, demo much like most retro games.
It appears that Unity 2018 has three options for RigidBody2D, and those are Dynamic, Kinematic, and Static. After some research, I learned that Kinematic and Static really only collide with Dynamic.
I read a different solution on the site that said the player should be Dynamic and everything else is Static. This is fine, but it opens up a whole slew of physics issues I wasn't expecting. Is there a specific way to set the dynamic properties so my player doesn't get bounced around by other objects? When another dynamic rigidbody hits my player, the player inherits the velocity and begins to drift away.
If this is the only method there is at the moment, I won't lie, that sucks. I guess I'll get used to it, but any help is greatly appreciated.
Answer by Tobychappell · May 26, 2018 at 07:51 PM
Increase Drag and Mass of the player and just drag of the other things.
Use a PhysicsMaterial2D to set the Friction and Bounce parameters to 0 and set that to the colliders of the player.
By default a Rigidbody2D's drag is 0 so it will always slide.
Your answer
Follow this Question
Related Questions
2D tilemap building game top-down,2D TopDown Building game with tilemap 0 Answers
Blocking object from going through colliders (no rigidbody) [2D] 1 Answer
HOW TO CALLBACK COLLIDER WITH NAME? 2 Answers
8-directional orientation, top down 2D, seperate from movement 0 Answers
How to stop player movement variable on collision (when button is still pressed down) 0 Answers