Sebi Posted July 19, 2014 Share Posted July 19, 2014 Hello guys, I have a question. Above my models, I want to display the respective character name. First I create a canvas for each name and use it as texture for my sprite. var name = new THREE.Sprite(new THREE.SpriteMaterial({ map: new THREE.Texture(canvas), useScreenCoordinates: false, transparent: true})); Then I add it to my models mesh. So far so good. Now I have the problem that the Sprite is affected by the camera's distance.name .scale.set(canvas.width, canvas.height, 1.0);name.position.set(0, 10, 0); This is stretching my sprite instead of displaying it at the canvas width and height.Is there an option to display my sprite at exactly the canvas width/height ignoring camera perspective and distance? Quote Link to comment Share on other sites More sharing options...
Sebi Posted July 20, 2014 Author Share Posted July 20, 2014 I think I have found a solution for my problem.I will just add a new function to my entity system and calculate the screen position of my entity mesh. Then use screen coordination to display my sprite. 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.