Hi,
Background - my need:
- implement moving platforms that follow a path (from Tiled)
- a player must move along the platform with no hackish code (ie. assigning a velocity matching that of the plaform).
Doing some research, I understand that:
- Based on other topics (see other forum topic) the player moves with a platform only if the platform has velocity (and friction of 1 to be in sync)
- it’s easy for a body to follow a path (as per lab example) using “set position” and a vector path.
Before I start re-implementing the wheel: do you guys know of a clean built-in way to tell a body to move to a point (and stop there) using velocity?
In less advanced engines, it was obvious to have to implement it ourselves with pseudo code like:
- identify next point.
- compute and apply x & y velocities.
- test platform position every step()
- point reached? move/stop/rewind as per config.
Seems like elementary needs for a 2D game, hence my supposing this kind of mechanism is built-in.