5
$\begingroup$

This is a very small question, and there is not much to explain; let me jump into it: I have my character with WSAD controls. When triggering any part of WSAD (using or controller), my animation plays. When I press A and D, W and S, all the keys together, or any odd combo where you should not be moving (e.g. you move left and right using A and D, so you don't move), the walk animation plays. When you are not moving, you should not look like you are. How can I pass this? Should I just use an and controller for all the combos? I, for those of you who need my question in a sentence rather than context, just basically want my character to play his walk animation only when moving. Thanks!

$\endgroup$

1 Answer 1

5
$\begingroup$

This can be best solved with a Xor controller. You need two of them. one for W and S, and one for A and D. Here is an example of a Xor gate.

enter image description here

Here is a .blend example.

$\endgroup$
4
  • $\begingroup$ well-written, well-earned. Say, have you ever gave a shot at an FPS; you answer many of my questions. I just would love to see your work. $\endgroup$
    – blackhole
    Jan 28, 2015 at 23:10
  • $\begingroup$ Most of what I do has a lot of great ideas that don't make it very far. I end up with a lot of games that just have cubes that I use for beta testing; as in this 2-person-sumo-wrestling game. $\endgroup$
    – Scalia
    Jan 29, 2015 at 0:29
  • $\begingroup$ Yeah I have made many projects that I worked on until I disliked it; however, I made a project that I have enjoyed for 3 years in development, but I am a single 13 year old and made many problems so I haven't even passed finishing the controller. Your shaders are nice though $\endgroup$
    – blackhole
    Jan 29, 2015 at 1:27
  • $\begingroup$ ahha. I didn't even make that one. got it off of BA. $\endgroup$
    – Scalia
    Jan 29, 2015 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.