Unity FPS Tutorial Enemy AI : C# Script for UFPS

preview_player
Показать описание
In this Unity FPS tutorial for UFPS I show how to add a new enemy to the game (soldier) with a Navmesh so that he is chasing the player.

I alslo explain how the C# script works to follow and attack the FPS player.

The script can be downloaded from my patreon here:

Please consider supporting me!

The free asset that is used for the enemy can be downloaded from the assetstore:

See my social profiles here

Рекомендации по теме
Комментарии
Автор

lovin your ufps tutorials. could watch 'em all night long...

weyounth
Автор

When my player pushes against a wall in one particular room in my game, the enemies stop moving towards him, almost as if him stepping outside of the nav mesh boundary zone (since it doesn't quite touch the walls) stops them being able to see his position to navigate to or something, but only in one room and for no particularly reason I can see.

Any idea why this might be happening?

Edit: Just figured it out two mins after writing this: One of the ceilings has the static set so it was baking the nav mesh to the ceiling, which was causing a conflict when I moved the player into the walls and stuff in that room. So I turned off static navigation for the ceiling (and all the other ceilings just in case) and it fixed the problem. :)

inceptional
Автор

One of the best tutorial I've ever Seen..

vincentvincent
Автор

Great tutorial. This is what I was looking for. Do you have tutorial in which the enemy retreats and/or looks for cover when taking damage. Thank you

TheTotochin
Автор

Is this just one video?, would love to have followed along from the start as this is just what i need for my own project.

DJLKM
Автор

Where is the weapon handler for the enemy?

AFuller
Автор

This script doesn't seem to work.

nikolaislater
Автор

Good tutorial of course, but could you please link the die animation somewhere?

duesjohn
Автор

hey sir. love your ufps tuts!
I am getting a problem with the game

the enemy is shooting but its not moving around. the code seems fine as well as nav mesh agent.
please help me, sir!

codingwithsam
Автор

Hi! Thanks for this tutorial. I am new in unity and i am using the same ufps version of this video. I have attached the soldier script to the toon soldier prefab, and Baked the navmesh Surface..and set up the animator, so the player correctly run from a waypoint to another and see me if at the right distance...but he don't shoot and don't die.. what script i must attach to It to make It shoot at me and receive my shots? Please help me, i am noob but i learn fast.

DemonBiker
Автор

Where can i find Vp Surface Identifier?

ioanniskopadis
Автор

Hi sir will you give me the link of Vp_surface identifier
i add the script to enemy but it doesnot damage to my player please help me out.

anikidrees
Автор

I am working on an AR based game and having issues in Respawning of enemies

qarabraza
Автор

hey man how did make the weapons switch? can u explain
?

rustyrishii
Автор

Is there any chance of you to make a tutorial for a companion AI that can be implemented on this? Thanks for the other tuts.

diegoXX
Автор

where are the other parts of this video? i want to see how you made your character

ConchStreetStories
Автор

You should say in your tutorial that UFPS is a 75$ package from visionpunk before we even start watching!

mazis
Автор

uhhh, I stuck in die script.What is the vp_Utility

sucukluomlet
Автор

how did you add animation in prewiev or how did you animation.(I'm turkish so ı can do mistake, sorry)

sarvenavc
Автор

Please can you share a target enemy respawn related video

qarabraza