Alright, so I decided I wanted to get a simple rugby character running around in a scene automatically. Like an NPC, you know? Just something basic to start with.

First thing, I opened up my usual game engine environment. Just dropped in a flat green plane to act as a pitch. Nothing fancy yet.
Then, I needed a character. I had this generic humanoid model lying around from another project, so I just grabbed that and imported it. Plopped it onto the field. It looked a bit plain, so I tweaked the scale a bit, maybe made it look a bit stockier. Close enough to a rugby player for now.
Getting it Moving
Okay, standing still is boring. I needed it to move. So, I attached a new script to it. My first attempt was super simple, just told it to move forward using its transform position. Yeah, that looked bad. It just glided across the floor like a ghost.
Realized pretty quick I needed some physics involved. Added a Rigidbody component. Hit play. Whoops, it fell straight through the floor. Classic mistake. Forgot the collider. Added a capsule-shaped collider, resized it to roughly fit the player model. Hit play again. Success! It stood firmly on the ground.
Making it Go Somewhere
Now it could stand, but it needed a purpose. I wanted it to run towards a specific spot. So, I created an empty object in the scene and placed it downfield. This would be its target.

Back to the script. Wrote some code to make the character find that target object. Then, added logic to move towards it. Had to figure out the direction vector first, then apply movement. Also needed it to face the direction it was moving. Used some rotation stuff, maybe `LookAt` or something similar, can’t quite recall the exact function I ended up with, but it worked. Now the character turned and ran towards the target point. Much better.
Adding Some Life
The movement was there, but it looked stiff. Like a statue sliding around. Animations were the next step. I dug up a basic run animation I had. Set up an Animator component on the character.
Making the Animator Work:
- Created a super simple state machine inside the Animator.
- Had an ‘Idle’ state and a ‘Run’ state.
- Made a condition (like speed > 0) to transition from Idle to Run.
- Made another condition (speed = 0) to go back from Run to Idle.
Hooked this up in the script. When the character started moving, I told the Animator to switch to the ‘Run’ state. When it stopped, switch back to ‘Idle’. This made a huge difference. Now it actually looked like it was running!
Basic ‘Goal’
So what happens when it reaches the target? For now, I just made it stop moving once it got close enough to the target point. The script checks the distance, and if it’s below a small threshold, it stops the movement, which triggers the Animator to go back to the Idle state. It’s basic, but it shows the NPC completing a task.

That’s pretty much where I got to today. Got a character model, added physics so it doesn’t fall through the world, made it run towards a target point, and added basic running animation. It’s obviously not a fully functional rugby AI yet – doesn’t know about balls, tackles, or teammates. But hey, it’s a start. Getting that basic movement and animation loop working felt pretty good.