Smart NPC Behaviour

Most people out there know the game Half Life 2. It had some amazing features for its time. Including some of the NPC’s behaviour towards the player and their movement.

I have a custom rig from HL2 and currently am Messing around with animations and AI.
The first few things Im curious about to start off this topic are the following;

Head/Waist turning - How would you make their head turn towards a player when they are close by but still be able to walk around? I’m guessing it uses Motor’s/Joints but it’d still be nice to know first hand.

Tools - Picking up and using tools that are dropped, Examples could be guns, knifes, Medkits, etc.

There are many others we can talk about but these basics could start us off and help a lot.

1 Like

Head Movement

I believe you could search for a Motor6D object in the character that deals with head movement. There are some properties you could edit directly from the Properties window (i.e. DesiredAngle). I can’t verify this, so you night have to play around first.

Tool Usage

Animation Editor is your friend. You could animate the character picking up a tool on there (without the tool of course), then export the animation to Rōblox. You could use any of the Attachment objects in your model’s rig (if it has any, otherwise ignore) to hold that tool on that respective body part.

If you’ve got any concerns, feel free to get back to me.

1 Like

Something you should keep in mind with NPCs of this detail is performance. From my experience with making detailed NPCs they do have quite heavy taxing on performance which is cruicial for you to keep in mind if you plan on having multiple active at once.

1 Like