Player physics

Hello,I am making an endless game my platform is moving towards -x axis and after ceratin x position it spawn again in ceratin positive but my player is not colliding after i apply rigidbody and collider on both ground and player
plz chk

Hi @Hamza_Butt and welcome!

Your setup seems to be correct.

How do you move your player entity?

Hi @Hamza_Butt,

I took a look at your code. It seems you’re using setLocalPosition() to move the ground. Since the ground has a static rigid body, the collider stays in the same position. To address this, consider switching the static rigid body to a kinematic rigid body, which allows for programmatically moving the collider.

Additionally, here’s a tip: adjust the player’s friction, resolution, and angular factors to 0.


I am not moving my player entity it is endless platform i am just moving platfrom to -x-axis and the comes to again front in x axis