vm6502q / OpenRelativity

An open source framework to add the effects of traveling at relativistic speeds to visualizations or games
17 stars 2 forks source link

Light positions should stay correct with static RelativisticObject instances #32

Closed WrathfulSpatula closed 3 years ago

WrathfulSpatula commented 3 years ago

I don't even attempt to handle, at all, the possibility of a point light that moves relative to world coordinates. However, to support real time lighting for at least stationary lights, it should be possible to attach a RelativisticObject component to a light source, set it as "IsLightMapStatic," and see it maintain relativistically correct position of the (world-coordinate-static) light as the player moves, probably with further reliance on "IsNonrelativisticShader." Getting this to work might fix some subtle bugs with "IsNonrelativisticShader" in general, which transforms the object's transform center point under the assumption that the material in use does not Lorentz transform.

WrathfulSpatula commented 3 years ago

Fixed by the tagged commits.