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

Infinitesimal gap between arcs #62

Open mattrdowney opened 6 years ago

mattrdowney commented 6 years ago

The best example is a single equator line that starts at z=1:

In this example, if the player falls along a plane of x=0 and crosses the z=1 point, they will fall through instead of colliding.

(Internal conflict: I sort of want to leave this one in for speedrunning.)

mattrdowney commented 6 years ago

This normally wouldn't be very consequential in speedrunning, but with the right design I think tricks could be added. Normally pixel-perfect-ish tricks are not well suited for floating point numbers, but if you put two hyperbolas as a floor/ceiling and rapidly jumped in theory the player could converge on a stable equilibrium.

mattrdowney commented 6 years ago

Secondary comment: this is a public API, not just my own private engine, so leaving a glitch in other's people's games isn't a great idea.

Serious attempt at a fix: detect collisions within Precision.threshold distance beyond the arc boundaries.