knb Posted September 15, 2016 Share Posted September 15, 2016 Hi I have a DeviceOrientationCamera. When looking at an object with this camera, I would like a button which will keep the object at the same place in the view (as if I take on object in a FPS game then move away with it in the hand) So when the camera orientation change, the object should "move" with it. Is there an easy way to do this? Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 15, 2016 Share Posted September 15, 2016 Yep there is:) Just make your object child of the camera with mesh.parent = camera You will need to update its position though as it will then be relative to parent. Quote Link to comment Share on other sites More sharing options...
knb Posted September 16, 2016 Author Share Posted September 16, 2016 Thank's, it works! It's just a little difficult to calculate new position/scale/rotating when you don't know matrix... But I found help on this too! Regards GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.