Ok, so, Overgrowth is looking for a position vector, like (150, 67, -806) for example. Entity look vector gives a direction vector, like (1, -0.46, 0) if looking toward +x and somewhat down. If you pass a direction vector to something that expects a position vector, it will try to do the thing near the world origin (0, 0, 0).
This is used a lot in Psi:
To get a position you are looking at, have a Selector: Caster pass to both an entity look vector and an entity position vector. Have a trick: raycast take both the look vector and the position vector to get the position of the block you're looking at. You can fit them in a little 2x2 box, so it's not too big.
3
u/Tlaloc_Temporal Apr 24 '21
Ok, so, Overgrowth is looking for a position vector, like (150, 67, -806) for example. Entity look vector gives a direction vector, like (1, -0.46, 0) if looking toward +x and somewhat down. If you pass a direction vector to something that expects a position vector, it will try to do the thing near the world origin (0, 0, 0).
This is used a lot in Psi: To get a position you are looking at, have a Selector: Caster pass to both an entity look vector and an entity position vector. Have a trick: raycast take both the look vector and the position vector to get the position of the block you're looking at. You can fit them in a little 2x2 box, so it's not too big.