Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Endeo

Member Since 09 Jun 2012
Offline Last Active Jun 10 2012 08:31 AM

Topics I've Started

Walking Animations

09 June 2012 - 04:53 PM

Hello everyone.

I'm currently working on moving and animation a character in unity and I've stumbled upon something I can't quite figure out, at least not in an easy way.

Basically, my character can move in 8 different directions using the WASD keys and always rotates towards the mouse, the camera is position usually top-down (think AlienSwarm).

Now the thing I'm wondering is, I want my character to do 4 different kinds of animations, walking forward, backwards and sidestepping left/right. But how does the game know when to use which animation? For example if my character was looking right was I was pressing A, how does the game know to do a backwards animation instead of sidestepping?

So basically I guess I need to figure out where my character is looking and compare it to where my character is moving but I'm not entirely sure where to start with this, any help would be much appreciated Posted Image

I can send some screenshots if there's some confusion about how exactly the game looks like.

PARTNERS