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

Field (Unity equivalent of collision triggers) #71

Closed mattrdowney closed 6 years ago

mattrdowney commented 6 years ago

OnBlockEnter/Exit/Stay was implemented, but OnFieldEnter/Exit/Stay have not been implemented.

mattrdowney commented 6 years ago

Primary issue is how fields are represented. Originally they were going to be a convex hull of planar intersections but now they're a convex hull of spheres.

The problem there is that all spheres must be colliding for a collision to register. A good example is a thin rectangle (where the small cap spheres would never both register with a naive implementation).

mattrdowney commented 6 years ago

Getting the plane data should be easy (in Arc.cs) which can be used to create a size 2 sphere fitted to the intersection plane / unit sphere pair.

mattrdowney commented 6 years ago

Prototype as of 2adc9bf5a94bc9634adff815998f5b7fff298dab

mattrdowney commented 6 years ago

Done as of 34eac71b671468c924823cdeb91d1ccb168fcca8