phr00t / FocusEngine

Focus Game Engine. This is Stride/Xenko fast-tracked for Phr00t's Software games. Improvements over the original Focus on Vulkan support, PC platforms, VR, performance & ease. Cherry-picks commits from other forks as needed.
MIT License
97 stars 11 forks source link

Add worldPosition(bool recalculate = false) #11

Closed phr00t closed 5 years ago

phr00t commented 5 years ago

On a transform, there isn't a "worldPositon" getter, like there is for simple "position". World position is currently stored in the WorldMatrix of the last frame, which can be grabbed via TranslationVector. However, if you want the latest frame, you need to recalculate the WorldMatrix. It would be nice if there was an encompassing worldPosition that gave you the option of getting the quick "last frame" location, or recalculating it for now.

phr00t commented 5 years ago

Done with commit https://github.com/phr00t/xenko/commit/80b6044664c6bf1aa4a110412b4864bc586728eb