robertgustavsson Posted November 12, 2018 Share Posted November 12, 2018 Hello, I'm currently working on a CAD-ish program and we have chosen babylonjs as our 3D-engine. However, now we are about to implement some camera movements and we noticed that some of our meshes turns out to be really far away and therefore they have some really strange graphics artifacts. We are currently just drawing lines to visualize our models and we figured we wanted to translate the whole scene to the camera instead of moving the actual camera, basically always keep the mesh that we are looking at around origin. However, we are struggling with how the get the actual positions of the linesmeshes to be able to transform them. Here is a playground illustrating the problem: https://playground.babylonjs.com/#0Z00WR As noticed in the console all meshes drawn are located at 0,0,0. We are probably doing something wrong or have misunderstood something. Is there anyone who can help? Regards, Robert Quote Link to comment Share on other sites More sharing options...
robertgustavsson Posted November 13, 2018 Author Share Posted November 13, 2018 We solved this by normalizing all mesh coordinates around 0,0,0 and then add the mesh to the world by setting mesh.position 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.