mattrdowney / planetaria

A Unity framework for Euclidean 2-sphere games (e.g. 2D virtual reality games) [quasi-MIT license]
Other
10 stars 2 forks source link

Player re-collides with platform immediately after derailing #60

Closed mattrdowney closed 6 years ago

mattrdowney commented 6 years ago

This causes a flicker effect and in the worst case an infinite loop (only way to escape is by jumping).

The two root causes: PlanetariaRigidbody.position is set without setting PlanetariaTransform.position (which means the old collision is used to calculate collisions on the next frame).

The player doesn't immediately move away from the platform (e.g. via an extrusion slightly larger than the player radius), which means the contains() function might erroneously detect a re-collision even though the player is generally moving away from the platform.

mattrdowney commented 6 years ago

Finished as of a327c31628d15e977727dae17eb26ee8cad9812c