Hi, I'm trying to get platforms that tilt left and right as the player is standing on them (basically the Angle is being changed via a Sine behaviour, making the platform go smoothly from Left-facing-slope -> Perfectly Flat -> Right-facing slope -> etc). The platform is a Solid (which seems to work better for this than Jumpthru).
However, this causes the player collision object (which is an ordinary rectangle) to jitter up and down when standing on it, especially at more dramatically tilting angles. The Platform behaviour seems to think that it is falling for a frame or two. Does anybody know how to do this properly?
Develop games in your browser. Powerful, performant & highly capable.
You can try this - use an invisible sprite with platform behavior (lets call it PlayerBox) and remove platform behavior from the player. When player is on this slope (use Overlapping at offset to check this), set Player position to lerp(Player.X, PlayerBox.x, dt*10), lerp(Player.y, PlayerBox.y, dt*10) , this should smooth out the jitter.
When player is not on the slope, simply set position to PlayerBox.x, PlayerBox.y
Thankyou, I'll try that!