playMaker

Author Topic: Set character controller speed.  (Read 2773 times)

sandEboy

  • Playmaker Newbie
  • *
  • Posts: 39
    • GraspTech
Set character controller speed.
« on: April 15, 2016, 11:02:59 PM »
Sounds simple, but apparently I ran into some trouble again. Whenever I move, whatever amount of speed my character builds up with the simple move action. It adds to the movement of other states on transition. Basically I need a way to set the speed back to zero without using simple move. As I don't want the gravity involved in this case. Any help? I can't find an action to do that.

For instance: Whenever I run and enter into another state with a translate action, the speed doubles what it should be. That doesn't happen when I don't run.
« Last Edit: April 15, 2016, 11:05:35 PM by sandEboy »

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Set character controller speed.
« Reply #1 on: April 16, 2016, 04:40:53 AM »
Hi,

I was just wondering, couldnt you set speed to 0 using the simple move just before transitioning to the translate?

Also another way may be to disable the character controller (by dragging the componenet from the game objects inspector to the action list of the state- then chosing 'set property' as an action and 'enable' for property.)

Good luck, hope it helps.

sandEboy

  • Playmaker Newbie
  • *
  • Posts: 39
    • GraspTech
Re: Set character controller speed.
« Reply #2 on: April 16, 2016, 09:30:30 AM »
Hmmm... that sounds like something worth trying.... I'll let you know how it goes.

sandEboy

  • Playmaker Newbie
  • *
  • Posts: 39
    • GraspTech
Re: Set character controller speed.
« Reply #3 on: April 16, 2016, 09:49:24 AM »
Nah, I had to add another state to do that before it transitions to the translate state. And it didn't work. *sigh* the speed still takes time to reach zero. I was hoping there would be a simple action to set the character speed that I just didn't know of. Seems that's not the case.

sandEboy

  • Playmaker Newbie
  • *
  • Posts: 39
    • GraspTech
Re: Set character controller speed.
« Reply #4 on: April 16, 2016, 10:15:57 AM »
I managed to get a little workaround. It's not bad, but not perfect either. I'm moving on from this, but keeping it open in-case anyone has a solution.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Set character controller speed.
« Reply #5 on: April 16, 2016, 12:33:55 PM »
I mean there is the simple action called 'set velocity'. But im not sure if that will have any issues with the controller.

Well it may work fine with the controller being there. Just try to 'set velocity' to 0.

If that does not work maybe you could try to disable the controler (as you just did), set velocity and then translate in the next state.

sandEboy

  • Playmaker Newbie
  • *
  • Posts: 39
    • GraspTech
Re: Set character controller speed.
« Reply #6 on: April 16, 2016, 01:22:36 PM »
I did try the set velocity but it wont work unless the character has a rigid body.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Set character controller speed.
« Reply #7 on: April 16, 2016, 03:37:33 PM »
Ive had a controller and a rigid body before on one game object, is there some reason you dont want to do that? (you could enable or disable the rigidbody as you need or something).

Im just a noob and after seeing what game youre working on I feel out my league even trying to help lol, but maybe if not help then I can offer some brainstorming assistence or something lol.

sandEboy

  • Playmaker Newbie
  • *
  • Posts: 39
    • GraspTech
Re: Set character controller speed.
« Reply #8 on: April 16, 2016, 05:47:57 PM »
No such thing, you're way more experienced than I am. I appreciate the help, which is a lot. I was looking for an easier route really but I'll definitely try that when I get back.