This tutorial shows how you how to use the dot product determine whether an enemy is behind, beside, or in front of a player. I then explain the dot product and its use cases, and finally, I apply it to create the following functionality:
Determine enemy position in relation to the player
Perform a critical attack when behind an enemy
Perform a weak attack when beside an enemy
Have an enemy sneak up on a player when the player is looking away
Can only attack the enemy when in range
Basic player controls (move and rotate)
0:00 - 0:55 - Introduction and Showcase
0:56 - 2:30 - Project setup (place enemy and player)
2:31 - 21:20 - Explanation of Dot Product and its application
21:21 - 52:47 - Implementation of everything seen in the intro
Full project can be downloaded from:
https://github.com/nostalgicbear/Unit...
Auf dieser Seite können Sie das Online-Video Unity Basic AI Tutorial - Dot Product mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Stephen 17 Juni 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,769 Mal angesehen und es wurde von 48 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!