playMaker

Author Topic: Having problems with character controls-3rd person action character  (Read 3688 times)

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Hi I've been working on my 3rd person character for a while now with Playmaker and it's awesome.
I'm having trouble getting the robot i made to transform into jet mode and have it be able to move around in jetmode. I am also having the issue where I have experimented where the character was in jet mode and be able to move around with the character controller but when going back to robot mode it just stays frozen.
The usual idle walk jump and run animations were not working but the controller was moving the character around.

I would like to have the character walk around and be able to transform and be able to fly and have the jet move around freely. Since I'm so new to this Im having a great deal of trouble  with this even with my own experimentation it's getting no results.

I have placed a link on the progress of the current character it's a screencast video of the character showing it's FSM trees.

Here is another video based on the new progress and attemps.


https://vimeo.com/41819353

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Here is the results of putting the Send event to the animation FSM and taking away the Play ANim.
I then tried it with the capsule and the Playmaker just ignored the Send events all together.


https://vimeo.com/41952332

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
The send events should go on your capsule.  and point to the character model.

just copy each of the send events to the section in your capsule that should trigger the fsms on your model.

eg: on the capsule, when you press forwards it would transition to a state that has a send event (which switches the model FSM "vulcan blah blah blah" to the "to walk" state

you just have them in the wrong spot right now.

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Thanks I'm doing that right now and the results are the same no different it's odd?

Thanks!

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Ok lets start from a basic barebones breakdown

Create a capsule and give it a character controller and a platform input controller component
add an fsm to the capsule
add a get axis vector action
and a controller simple move action
create a vector3 variable and put it as the stored vector in the get axis vector action
also create a float variable and store the "magnitude" from the get axis vector action into it. (make it as global as well)
and also add it to the vector of the controller simple move action
also make the "relative to" section of the movement action relative to your main camera

Now parent your model with the animations on it under the capsule and turn off the mesh renderer component of the capsule.

now your mech should be sliding around your scene.

Next on the mech game object (the one parented under the capsule) - add an fsm and create 2 states.
create 2 global events called "idle" and "walk".  right click each state and choose "add global transition" and pick the Idle and walk global events you made a minute ago.

In each of those 2 states create a "play animation" action and pick the idle and walk animations respectively

Now back on the capsule, create a second fsm and create 2 states

each state will have a "float compare" action on it.

The first will compare your magnitude variable to 0 and if its greater than, you will transition to state 2
state 2 will compare magnitude to 0 and if its equal or less than, it will transition back to state 1
Each state will also have a "send event" which will point to the player model mesh, and point it to the fsm we created earlier on it.

One the first state it will point to the "idle" global event, and on the second state it will point to the "walk" global event.

Now your dude, should be standing still while not touching the input controls, and should play the walk animation whenever you are pressing forwards on the joystick.

Give that a go.

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Hey you guys are great! Wouldn't have been able to make this much progress without the forums!
I have gone through the suggestion you mentioned justifun. Another issue arises for some odd reason he is able to be controlled when in jetmode fine but at some point when you turn around the controller begins lock and not move. I then transform the character back and it does it just fine but the walk cycles are not working at all. Should I delete the float compare that was previously put in before you suggested these changes? If so I tried that and the character does nothing all together it just recognizes the controller movements and doesn't call out the FSMAnimations at all even if I leave the playanimation action intact. Here is a video of the progress.

https://vimeo.com/42036839