In this video we'll write a simple as possible script for our enemy to analyse it's surroundings and decide whether to move or jump - while chasing our player!
Our script will be adaptable - meaning our enemy movement won't always be 100% perfect. This leads to alive feeling gameplay! Feels like the enemies thinking, rather than path finding the level.
You can change the values we use in this video to suit your own game, or use different values for different enemy types!
❗️❗️❗️📢 BUY THE COMPLETE GAME TEMPLATE NOW!!! 👾❗️❗️❗️
https://gamecodelibrary.itch.io/2d-pl...
All source code for all videos I have made and will make in the future can be found on my Patreon:
https://www.patreon.com/posts/9222771...
Check out the series previous videos:
• FULL Platformer Tutorial Series - Uni...
Sprite sheet: https://www.kenney.nl/assets/1-bit-pl...
Discord: / discord
I'll be posting new videos every week, so be sure to subscribe to see what kind of adventure we can go on together! I'm excited! :-)
If you have any suggestions, feedback or questions, be sure to comment below! Any opinions will help me out on this journey ♡
0:00 - Intro
0:10 - GameObject Setup
0:43 - Script
5:04 - Layer Setup
5:29 - He's ALIVE!! + Fix Gravity
5:46 - Fix Jump (Increase Above Check Range)
6:15 - Fully Working!
6:26 - Outro
Смотрите видео Dynamic Enemy AI to Jump Gaps and Chase Player - 2D Platformer Unity #12 онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Game Code Library 03 Ноябрь 2023. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 3,140 раз и оно понравилось 101 посетителям.