Intro to the Vector Dot Product: How to code a Field of View in Godot

Channel:
Subscribers:
293,000
Published on ● Video Link: https://www.youtube.com/watch?v=dC4-TSFv32Y



Duration: 8:33
40,110 views
0


Learn how to use the vector dot product to detect if an enemy is within the player’s cone of vision or FOV.
Make Professional 2d Games (Kickstarter): https://gdquest.mavenseed.com/courses
----
The source project: http://bit.ly/intro-to-dot-product

Vectors are essential when it comes to 2-D game creation. We talked about arithmetics. it’s time to go one step further with the dot product. You can not only use it to get the exact angle between 2 vectors using trigonometry: it also helps to detect whether 2 characters are facing the same direction or away from one another.


New tutorial every day until June 22! 19/30
The playlist: https://youtube.com/playlist?list=PLhqJJNjsQ7KEr_YlibZ3SBuzfw9xwGduK
Project sources on Github: https://github.com/GDQuest/Godot-30-days-tutorial-challenge-2017

This tutorial is supported by:
- Gamblify: https://www.gamblify.com/
- Pineapple Works: http://pineapple.works/
- Play it Forward Space

Subscribe to the channel now and become a member of the community! https://youtube.com/c/Gdquest?sub_confirmation=1

Follow GDQuest on:
Twitter: https://twitter.com/NathanGDquest

This video is licensed under the CC-By 4.0 license: https://creativecommons.org/licenses/by/4.0/

You can attribute it to "GDQuest and contributors - https://www.gdquest.com/"







Tags:
Dot product
field-of-view
angle between two vectors
AI
tutorial
game creation
Godot game engine
angle between vectors
Godot 2
Vector tutorial
game engine
GDScript
geometry
programming
gamedev
gdquest
nathan lovato
vector
dot
product
angle
vectors
godot tutorial
game development
game creation tutorial
artificial intelligence
open source
game programming
game design