playMaker

Author Topic: Player Movement/Animation Help  (Read 2740 times)

Jtheme

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Player Movement/Animation Help
« on: December 14, 2012, 11:40:58 AM »
Iv'e looked through the forum for help on this and I couldn't find any.

I'm trying to set up my 2d character sprite in a 3d world.  I'm using tk2d and smoothmoves for animation.

I already have my character moving with "w,a,s,d".  I'm needing for the player to shoot when I press the mouse button in whatever direction the mouse is and play the animation for that direction.

So my character can be running left but shooting right and so on.

Exactly like the gameplay in this game https://www.youtube.com/watch?v=tzyKQH04mQQ

Any help would be greatly appreciated.  Thanks.

Jtheme

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Player Movement/Animation Help
« Reply #1 on: December 14, 2012, 05:10:14 PM »
Any Help Would be greatly appreciated.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Player Movement/Animation Help
« Reply #2 on: December 14, 2012, 06:18:08 PM »
Hi,

 Are you able to find the right direction , but you struggle firing the right animation? or do you also need some help to figure out the direction?


bye,

 Jean

Jtheme

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Player Movement/Animation Help
« Reply #3 on: December 15, 2012, 10:23:42 AM »
My biggest problem is making an animation change when my mouse goes infront of the character (it's a top down game) or to the left, right, or back. 

I'm not even sure if it is possible with Playmaker and the fact of I'm working with sprites instead of models.

Jtheme

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Player Movement/Animation Help
« Reply #4 on: December 15, 2012, 07:06:00 PM »
I think I have come to realize that I should probably try to do it a different way.

So I have my animation set up like this

But when I am walking forward for example "w" and then press right "d" and walk for a while and then let go of "w" I go back to Idle.  Any way of fixing this?
« Last Edit: December 15, 2012, 07:11:26 PM by Jtheme »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Player Movement/Animation Help
« Reply #5 on: December 17, 2012, 03:20:38 PM »
Hi,
 
 uhm, difficult to say without looking at how is made your character and its environment, could you show what you aim for visually?


bye,

 Jean

Jtheme

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Player Movement/Animation Help
« Reply #6 on: December 22, 2012, 02:29:53 PM »
My biggest goal is having a sprite in a 3d world, having him walk with w,a,s, and d.  and having him shoot with the mouse button and aim with the mouse cursor.  with a camera in a third person state.  The biggest challenge that I can't figure out is, getting his animation to change when the mouse is behind him for example. or on the left of him or right, so he looks like he is shooting in that direction.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Player Movement/Animation Help
« Reply #7 on: December 24, 2012, 01:32:31 AM »
Hi,

 Have you studied the examples provided by ex2d or else? if you can find a working scene that does what you need, I can certainly have a look a make it work with PlayMaker.

bye,

 Jean

Jtheme

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Player Movement/Animation Help
« Reply #8 on: December 24, 2012, 12:47:53 PM »
Yeah, the problem is I can't find a scene example that does what I need.  The only example scene that I have found doesn't really work because it is using 3d models "Angry Bots".  That is the only example scene I have came across that is exactly how I want my controls.