Hi!
I am new to Unity and I am learning as I go. I was wondering how to make an object follow the Player (character controller)?
Any ideas???
thanks in advance.
Dx
Hi!
I am new to Unity and I am learning as I go. I was wondering how to make an object follow the Player (character controller)?
Any ideas???
thanks in advance.
Dx
Take a look at the SmoothFollow camera script in standard assets. You should be able to modify that for this purpose easily enough.
–Eric
You might also want to check out the third person example project here
You might also want to check out the 3D Platform Game project here
thank you guys, I will check those and post back my results.
I am sorry I think I did not ask the correct question.I am looking for a script to make other characters on the game seek my player and go and stand infornt of my player.
Concept (not code since I haven’t done this yet)
Enemy A has a scanner trigger that checks distance to PLayer A, if distance to Player A < Distance Allowed, point enemy to player and chase until Enemey A and Player A distance = desired amount, stop Enemy Movement.
Oh, in that case, have you looked at the FPS tutorial? Specifically the “AI” script in the WeaponScripts folder. Again, you’d have to adapt it somewhat (it doesn’t sound like you want any of the “patrolling waypoints” functionality for example), but the basic concept is there. Right now the AI only goes after the player if it sees him, but you can change that so it goes after the player all the time. In particular check out the MoveTowards function…seems like that’s more or less what you want.
–Eric
this is what i needed. Thank you so much Eric. I will edit the code to do what i need.
My trick with that is adding an auto waypoint script(Weapon Scripts in fps tut) to the player.
AC