Hey there!
I have been testing the new floating origin feature and found a problem when parenting the camera to another object (could be useful for a character/vehicle controller):
Is there something missing in this PG to make it work?
Hey there!
I have been testing the new floating origin feature and found a problem when parenting the camera to another object (could be useful for a character/vehicle controller):
Is there something missing in this PG to make it work?
I think changing camera.position to camera.globalPosition here should do the trick. I can make a PR if you want
cc @georgie
I opened a PR for the fix:
thank you for testing the feature / identifying the bug / proposing a fix! adding comment to the PR ![]()
p.s. feature is still in development so there are other known limitations (such as shadows not rendering), I will continue to checkin fixes ![]()
Thank you for implementing the feature in the first place! I am very excited to use it instead of my ugly translateEverythingNow custom function used to translate the camera to the origin with the entire scene (which was not Havok friendly at all!)
@CrashMaster FYI I have an incoming change that moves FloatingOriginMode to engine instead of scene creation options.
To enable it, pass { useFloatingOriginMode: true } when creating engine.
And to enable in playground, override the createEngine function like this Babylon.js Playground
I will make an announcement post as well once the PR is checked in
Thanks for the update, it’s good to see the feature is making progress ![]()