MaverickGeek Posted August 17, 2017 Share Posted August 17, 2017 Why is the forward Vector Depending on Z position of Box in the example below? Change box.position.z to 10 & then -10 The forward Vectors are different! Forward Vector Shouldn't depend on Position. It only depends on orientation! https://www.babylonjs-playground.com/#0EXNGT#1 Quote Link to comment Share on other sites More sharing options...
MaverickGeek Posted August 17, 2017 Author Share Posted August 17, 2017 Just realized it must be related to the last 4,4 position of matrix which is set to 1 if it is vector & 0 if it is direction! Where do you specify this ? Quote Link to comment Share on other sites More sharing options...
adam Posted August 17, 2017 Share Posted August 17, 2017 You can use mesh.getDirection for this: https://www.babylonjs-playground.com/#0EXNGT#2 Quote Link to comment Share on other sites More sharing options...
MaverickGeek Posted August 17, 2017 Author Share Posted August 17, 2017 Solved! Using TransformNormal instead of TransformCoordinates! https://www.babylonjs-playground.com/#0EXNGT#4 Quote Link to comment Share on other sites More sharing options...
adam Posted August 17, 2017 Share Posted August 17, 2017 You're welcome. MaverickGeek 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.