#How to get the `Vector3` Directly infront of a Entity

1 messages · Page 1 of 1 (latest)

grave bobcat
#

I'm trying to get the Vector3 infront of a Entity. This location should be the same coordinate as when i run ^^^1 on a entity.

near mica
winter iris
#

yes

#

entity's z axis is player's view direction

grave bobcat
#

@winter iris nah that not right

#

it needs to be based off its rotation

winter iris
#

view vector is based on rotation

grave bobcat
winter iris
#

a player has a local cordinate system x y z the z local axix is known as view vector on minecraft

grave bobcat
#

nah

winter iris
#

which is = ^^^1

#

the third

grave bobcat
grave bobcat
winter iris
grave bobcat
winter iris
#

how its not right

grave bobcat
winter iris
#

viewVector is a unit vector means its magnitude is 1

so adding viewVector to location gives u 1 block away from player

#

idk why it doesnt makes sense to u

#

🤔

grave bobcat
winter iris
#

did u tried con's code?

grave bobcat
winter iris
#

what result u got

grave bobcat
#

not infront of the entity based on where its facing

winter iris
#

show code?