mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Updated tutorial_vector_math (markdown)
parent
f372e09de5
commit
6577f4d4c0
@ -184,7 +184,7 @@ var BA = A-B
|
||||
|
||||
Ideally, if the guard was looking straight towards snake, to make eye to eye contact, it would do it in the same direction as vector BA.
|
||||
|
||||
The dot product between **F** and **BA** is greater than 0 will determine if Snake has been discovered. This happens because we will be able to tell that the guard is facing towards snake:
|
||||
If the dot product between **F** and **BA** is greater than 0, then Snake will be discovered. This happens because we will be able to tell that the guard is facing towards him:
|
||||
|
||||
```python
|
||||
if ( BA.dot(F) > 0 ):
|
||||
|
Loading…
Reference in New Issue
Block a user