How to point to a Vector3

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By graph100

I am currently making an fps and I am trying to have an enemy point to the player, but I have no knowledge of vector maths. Anyone know how to do this?

I believe that the look_at() function can do that, but I am not entirely sure.

Millard | 2020-07-07 18:04

The docs have a page specifically answering a number of frequent questions regarding vector math.

DDoop | 2020-07-07 21:22

It can. In 3D give look_at the Vector3 point and an up direction and it will look at that point with the -Z axis.

Magso | 2020-07-08 09:43

how did you do the pink color for the look_at in your comment?

Millard | 2020-07-08 17:05

Highlight the text then click the { } button at the top.

brackets do this

and this.

and speech mark (not comma) button does this

Magso | 2020-07-08 17:44

thank you, that will be very helpful. :slight_smile:

Millard | 2020-07-09 19:59