playMaker

Author Topic: 3rd person issue  (Read 7664 times)

ColeBK

  • Playmaker Newbie
  • *
  • Posts: 16
Re: 3rd person issue
« Reply #15 on: November 30, 2013, 10:55:43 AM »
I use the MoveSpeed variable to determine wether the character is moving forward/backwards/idle so I can play the appropriate animation walk animation.

The Direction Variable is used to determine wether the character is turning or not, so I can play the turning animations.

You  have to handle these 2 Axises separately, as they need different animations.


colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: 3rd person issue
« Reply #16 on: November 30, 2013, 12:22:48 PM »
I have been able to setup a new FSM

I have it setup like your kind example handling the 2 Axises separately.

Horizontal stored in X axis

vertical stored in Z axis

using float compare x axis to zero

is greater than moving right

less than moving left.

using float compare Z axis to zero

is greater than moving Forward

less than moving Backward.

How would I check when both forward and right are pressed?

ColeBK

  • Playmaker Newbie
  • *
  • Posts: 16
Re: 3rd person issue
« Reply #17 on: November 30, 2013, 12:33:58 PM »
The FSM setup that I've shown in the first screenshot will handle both Axises, and will move the character.

You only need to setup conditions in Mecanim(For animations), not in the FSM.

Just to make it clear, what it is exactly that you want to achieve? (Not sure if you want to make Mecanim animations as you're talking about a capsule).


colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: 3rd person issue
« Reply #18 on: November 30, 2013, 01:03:38 PM »
Sorry for the confusion.

I am not using Mecanim(For animations) but would like to use simple sprite pro for my sprite animations not 3d models.

Does the Mecanim(For animations) check in some way for both up and right key press?

ColeBK

  • Playmaker Newbie
  • *
  • Posts: 16
Re: 3rd person issue
« Reply #19 on: November 30, 2013, 01:10:27 PM »
Simply add 2 conditions(MoveSpeed, and Direction) in Mecanim for the animation.

I know nothing about simple sprite pro, so I cannot help you with that, sorry.

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: 3rd person issue
« Reply #20 on: November 30, 2013, 01:27:46 PM »
Thank you for your very kind help.

I have yet to use Mecanim, but if it can check for both keys pressed there must be a way for me to do it too.

But I can not at present find a way to do this.

Currently I leave the Direction of character when I press only one key

When I press two keys the object does move in the correct direction but only one key state shows as active.

I need to check is forward and right both active possibly I am returning to quickly to the Direction of character state.

I will keep trying

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 3rd person issue
« Reply #21 on: December 02, 2013, 01:11:06 AM »
Hi,

 you can reuse the value you got from the "get axis", or you have a new fsm getting the axis again, nothing wrong with this, especially if you expect concurrent behavior using the same inputs.

bye,

 Jean

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: 3rd person issue
« Reply #22 on: December 02, 2013, 04:31:35 AM »
Hi,

 you can reuse the value you got from the "get axis", or you have a new fsm getting the axis again, nothing wrong with this, especially if you expect concurrent behavior using the same inputs.

bye,

 Jean

Hi Jean I have requested help on this issue in a new post,

http://hutonggames.com/playmakerforum/index.php?topic=5649.0