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

No __Internal Objects #129

Open mattrdowney opened 5 years ago

mattrdowney commented 5 years ago

The internal objects are hard to synchronize e.g. layers.

For PlanetariaCollider, the solution was easy after refactoring to one SphereCollider.

For PlanetariaAreaRenderer, the SpriteRenderer seemed difficult until I read about Sprite.vertices and OverrideGeometry()

For PlanetariaLight, this will be simple when everything is on the GPU, but for now it means point and sector lights can only be 180 degrees and arc lights can't have cuculorises.

PlanetariaAudioSource might be a problem, though

mattrdowney commented 5 years ago

Another difficulty is PlanetariaCamera, which requires two nested internal objects (one for zoom and scaling eye distance, the other for head control).

mattrdowney commented 5 years ago

If I want to use shared meshes, overriding vertices for PlanetariaRenderer is a bad idea.

mattrdowney commented 5 years ago

This all proves to me that the ideal solution is to use the Entity-Component System to avoid internal objects.