Search the Community
Showing results for tags '2dto3d'.
-
Hi, I've 2D vertices array and bones. Can you please suggest algorithm for construction of per bone weights for vertices. Currently I'm assigning weights by dividing 1 to bones distance from vertex, not sure how correct this is. Thanks.
-
Hello, I have some UI elements on the DOM that I want to move relative to the 3D objects, I searched this forum and generally and the best I could find was: scene.afterRender = function() { var worldMatrix = planet2.getWorldMatrix(); var transformMatrix = scene.getTransformMatrix(true); var position = planet2.position; var viewport = scene.activeCamera.viewport; var coordinates = BABYLON.Vector3.Project(position, worldMatrix, transformMatrix, viewport); console.log(coordinates, window.innerWidth * coordinates.x); }; but unfortunately the coordinates keep changing because the object is rotating, so is there another way to track the object absolute position and convert that to screen position so I can use it the the `window` gets resized or when the camera changes angle?