none-9999 Posted December 9, 2017 Share Posted December 9, 2017 I need to create the "radar screen" to locate asteroids and ships, but I can not understand how coordinates systems work in BabylonJS. When the game starts, the ship is at 0,0,0 after moving on the x axis, (or what I believe was moving on that axis). How is it possible for the z-axis values to change? Note: I do not move on the y axis. At what point did I move 145 units on the Z axis? What am I doing wrong ? In the second image you can see the options that I have tried .. and i tried this too Quote Link to comment Share on other sites More sharing options...
brianzinn Posted December 9, 2017 Share Posted December 9, 2017 Have you tried mesh.getAbsolutePosition()?https://doc.babylonjs.com/classes/3.1/abstractmesh#getabsoluteposition-rarr-vector3-classes-3-1-vector3- edit: see you have that in your screenshot. How sure are you that red line is an x-axis? Maybe put one of these in your game?https://www.babylonjs-playground.com/#EYZE4Q#1 Quote Link to comment Share on other sites More sharing options...
none-9999 Posted December 12, 2017 Author Share Posted December 12, 2017 many thanks, It helped me a lot, I had rotated the camera and that's why I moved in two directions at the same time ... brianzinn 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.