0
votes

Is it possible to turn off sizeAttenuation for an Object3D in THREE.js?

I ask because I'm drawing a trajectory on a very large scale using arrow helper to indicate the direction of motion, and I want the heads of the arrows to stay oriented correctly (unlike using a pointcloud w/ sprite points), but also not shrink/grow as you zoom the camera.

Any other ideas? Can I achieve the same effect using a pointcloud/lines?

1

1 Answers

0
votes

sizeAttenuation is just rescaling the sprite based on it's position to give a sense of a "virtual size". Object3D's have an actual size so they scale with perspective.

Outside of switching to an Orthographic Camera (might not be ideal for everything else you're doing), the only things that come to mind are

  1. position the arrow closer to the camera always, so it doesn't change size
  2. constantly adjust the scale of the arrow to make it larger/smaller in the scene, so it appears to be the same size on the screen.