Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Constant movement in a side-scroller

Discussion in 'Physics for ECS' started by Srokaaa, Jun 9, 2020.

  1. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    Hey, I am making a "infinite runner" type of a game. In those type of games usually player entity is staying on a single plane/line and world movement is simulated by world moving around player in a single direction. How would I go about properly simulating physics in such case?
    I tried to fake it with friction between ground and all dynamic entities but it seems even with friction set to 1 objects do not match their velocities eventually as can be seen on a video below:


    Is there any way to move every dynamic object in given direction by some increment every frame?