Is it possible to lay sprites flat on a plain?

I want to know if it is possible to set a sprite flat on it’s x-axis in the same position as a plain, or a “floor” in a scene, and still have it rotate only on the y-axis so that it always faces the camera? Not sure I’m explaining this correctly, so I’ve added a few images that help illustrate my question.

The map can be set at an angle, but I’m showing this from directly above, with no angle so that all names show flat on the map.

As the map is rotated, the names stay in the same orientation.

I’d be using OrthoControls, so no matter where the camera is moved to, the sprites will always appear right side up. If this can’t be done using Sprites, is there any other way it can be done in three.js?

Thanks for your help.

Hi!
Are you looking for something like this? Mesh points to the camera on only 2 axis with shaders - #3 by prisoner849

Yes!
The only thing I want different is for the image to lay flat on the grid, and still turn as the camera is moved. Does that make sense?

Not that much changes needed for that jsfiddle in my post:

var planeGeom = new THREE.PlaneGeometry(1, 2);
planeGeom.translate(0, 1, 0);
planeGeom.rotateX(Math.PI * -0.5); // add this line to lay trees down on the grid

Thanks for this. I really appreciate it.
Can this rotation be done on it’s own, or will it still need the shader?

That fiddle doesn’t use modifications for shaders at all: https://jsfiddle.net/prisoner849/w19d5km7/

Cool! Thanks again. I REALLY appreciate your help.

1 Like