How to position a raycaster at a specific origin?

I’ve tried to setup a raycaster on a box mesh at a corner vertex with a slight offset and updating it each frame which works fine but when it is rotated, the origin changes and so does the direction.

How would I fix this so they always remain relative to the box mesh and not change even when rotating?

This seems like a self-contradiction :thinking: ? Both Raycaster and Ray are math classes (ie. not an extension of Object3D), so they can’t inherit transformations from parents - like 3d objects would (though you can probably get that inheritance, by setting original origin in Raycaster constructor to position vector you’d like to keep track of - see here how the Rays are created and in which places .copy is applied to vectors.)

You can use Raycaster.set to update the origin after box transformation changes.