infinite endless runner game Camera and Player are static or not

i am started the infinite runner game i have some confusion in game player and camera are static or not

I’m assuming you mean static as in not moving and not in the programming sense.

Yes, I would keep both the player and camera static, and move the ground/obstacles/etc. instead. This keeps your coordinates nice and clean, so your player won’t have an x coordinate of, say, 326718.321 after only 5 minutes of play.

I would also recommend removing the ground/obstacles/etc. back into your object pool (see pooling) once they’re out of the camera view, so you don’t have an infinitely growing list of game objects.