droggam Posted October 20, 2018 Share Posted October 20, 2018 Hi leta say i have a spaceship, how do i define a special point in vector3 y,z,x with help with THE scene in My case i try attach a flag but dont know how to find 3d position easiest possible way? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 20, 2018 Share Posted October 20, 2018 I'm not sure I understand. You can define a vector3 position? It is very simple : mesh.position = new BABYLON.Vector3(5, 1.0, 12); You can get a position with : var positionVector3 = mesh.position.clone(); var positionX = mesh.position.x; Quote Link to comment Share on other sites More sharing options...
droggam Posted October 21, 2018 Author Share Posted October 21, 2018 ye i understand i guess i need to bruteforce try get the correct position problem with your solution is it get the center of the spaceship but not like on top of it where i want my flag? @Dad72 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 21, 2018 Share Posted October 21, 2018 I do not understand what you mean. Maybe a PG will help to better understand. Quote Link to comment Share on other sites More sharing options...
Gijs Posted October 21, 2018 Share Posted October 21, 2018 Hi, to get the top position you can pick with a ray: https://doc.babylonjs.com/babylon101/raycasts#raycasts https://doc.babylonjs.com/babylon101/picking_collisions 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.