playMaker

Author Topic: Help with Character controller  (Read 6050 times)

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Help with Character controller
« on: April 28, 2012, 09:42:22 AM »
Hi everyone  I've been working on a character this week to walk and run and be idle when doing nothing.
Doing the Animationgraph,and animation graph2 tutorials I was able to achieve this. The only thing I'm having trouble understanding is how to connect jumping and running to it as well as making it transform state. Since the character has a movespeed and run speed attached to it. I would like to keep that but have the shift key to make the character run and spacebar to make it jump and have ctrl key to make the character transform.
I just don't want to break the current setup I want to add to it since it's working great.
Any suggestions on how to go about doing this?

Thanks ;D

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #1 on: April 28, 2012, 02:17:17 PM »
I got the jump and transformation applied as well as the running.
Does any one know if there is a script to reverse an animation that's already completed?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Help with Character controller
« Reply #2 on: April 28, 2012, 06:27:54 PM »
Try setting the animation speed to -1.

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #3 on: April 29, 2012, 12:04:07 AM »
Thanks I was looking for a reverse animation action or something and there was nothing there. I even was experimenting with the wait action and nothing.

I have another question my character transforms into his jet but goes back to normal, is there any way I can keep him at that jet state and control him with the current move you developed with the FSM move you made on your tutorials?

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #4 on: April 30, 2012, 09:34:40 PM »
That didn't seem to work at all?
I would also like to have the character transform from jetmode back to robot mode? so far everything I've been doing has either not worked or defaulted to just going from robot to jet and nothing more any suggestions.
I'm also going by the animation graph and animation graph2 for animations
The robot has a Fsm for Animations in them are walk run jump idle transform and jet mode.
I would also like the character to be able to rise up in the air and glide like a jet back and forth and when transforming back to robot mode to turn on the character controls again also any suggestions on how to go about this I just got the software so I'm very new to this.

Thanks again.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Help with Character controller
« Reply #5 on: April 30, 2012, 10:17:01 PM »
Quote
That didn't seem to work at all?

Do you mean reversing the animation?

I just tried a simple test, and it worked okay. But it is sensitive to the animation wrapping mode. I had to switch the wrap mode to ClampForever:

http://unity3d.com/support/documentation/ScriptReference/Animation-wrapMode

The other wrap modes reset the transform at the end of the animation. ClampForever keeps the pose that you want to reverse from.

Not sure how you set this if the animation is an exported fbx...

EDIT: Also the FINISH event isn't sent when the animation is played in reverse, so you'll need to send that event manually (Send Event with a Delay).

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #6 on: April 30, 2012, 11:21:29 PM »
I tried that in different combinations and to no avail, I eventually just added a reverse animation on my own and then re-exported the character as a .fbx and its working great.

Another question I have is I made the 3rd person controller based on your AnimationGraph1 and Animation Graph2 tutorials and added the jumps,transformation and run based on your simple 3rd person controller with the key down techniques. It's working great, now my question is I would like the jet to be able to fly up in the air and have a controller that is independent of the regular character controller and the platform controller I put into it to make it jump and run and what not.

Got any suggestions? This is awesome stuff let me tell you glad you came up with this I'm not a programmer and already I'm getting great results!


Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Help with Character controller
« Reply #7 on: May 02, 2012, 02:25:42 PM »
Is the character controlled with physics in jetpack mode? I would make an FSM to track the control mode. E.g. with 2 states: OnFoot, InAir. When you switch to InAir, disable the components/FSMs you don't need and enable the components/FSMs you need for InAir movement. And the other way around when going back to OnFoot. You might need some other states like a Falling state between InAir and OnFoot...

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #8 on: May 02, 2012, 03:23:16 PM »
I included your set up which you made on the tutorials and I added in the platform input controller as well.

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #9 on: May 03, 2012, 11:21:05 PM »
I have included several images showing what I made, basically the character has a character controller, character motor, and platform input controller.

I would like it when the character transforms into jet to have the character be controlled by the controller and stay in jet mode. I would also like for it to rise up in the level I have already set limits or colliders in the level to prevent the character from escaping the scene.

But in the first state of the transform I put play animation  and set animation to idle.And set it to idle and the rest ran down.
Is there a way I can have it look and check whether if it's in that mode to turn off gravity all in the controller FSM?


numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #10 on: May 03, 2012, 11:21:48 PM »
Here is the other one it didn't show up on my other post

numonic

  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with Character controller
« Reply #11 on: May 06, 2012, 01:44:33 AM »
Character is not controlled with physics in jet mode he doesn't have any controller sections attatched since I must made the transformstate a seperate FSM.