- Home /
2D colliders not work
,Hei i have a player and a wall with this Rigidbody2d and BoxCollider2d Rigidbody2D::Player { [BodyType]=Kinematic; [Material]=none; [Simulated]=true; [UseFullKinematicCont]=false; [ColisionDecetection]=Discrete; [SleepingMode]=StartAwake; [Interpolate]=none; }; BoxCollider2D::Player { [Material]=none; [IsTrigger]=false; [UsedByEffector]=false; [UsedByComposite]=false; [AutoTilling]=false; [EdgeRadius]=0; } Rigidbody2D::Wall { [BodyType]=Kinematic; [Material]=none; [Simulated]=true; [UseFullKinematicCont]=false; [ColisionDecetection]=Discrete; [SleepingMode]=StartAwake; [Interpolate]=none; }; BoxCollider2D::Wall { [Material]=none; [IsTrigger]=false; [UsedByEffector]=false; [UsedByComposite]=false; [AutoTilling]=false; [EdgeRadius]=0; } They have colliders and rigidbodies but does not collide,why?
Firstly, please format the code section of your question, it's kinda hard to read your question currently :) And, is the player moving at a really fast speed? And also have you checked the collsion layers, to make sure if the player and the wall are able to collide in the first place?
Answer by Infenix · Aug 03, 2020 at 02:36 PM
Both of them are kinematic. You need to have one of them as a dynamic rigidbody to get the collision to happend. The dynamic one should be the player (assuming the player is the moving thing).
Thank man! It's work,i put it on dynamic and the gravity at 0 cause i dont need it and it's work perfectly.