playMaker

Author Topic: Character looks in one direction and flies in another.  (Read 2818 times)

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Character looks in one direction and flies in another.
« on: December 06, 2012, 11:44:57 AM »
Hi. I'm trying to create a game where you fly a paper plane and since I just got Playmaker I wanted to use it for the character control. Im using this tutorial as a base:

http://youtu.be/ykah5VSdP7E?t=3m44s

What I have now is basically that, plus a "press space to add force UP"

The Problem is - as you can see in the video, the character keeps moving in the direction of its momentum, even when it turns around.

Is there a way to lock the movement to its orientation? So when it rotates, the the motion is updated to be facing forward.

Any help would be greatly appreciated!  :)

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Character looks in one direction and flies in another.
« Reply #1 on: December 06, 2012, 02:51:47 PM »
Are you updating the rotation every frame?
Are you moving towards your rotation vector?
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Re: Character looks in one direction and flies in another.
« Reply #2 on: December 06, 2012, 03:02:21 PM »
Yes to the first.

Kinda? To the second. I'm moving towards where the character is facing but only after the Forward Add Force (Im using torque for the rotation) gets stronger than the momentum in which it was moving, which takes ages and make it really hard to control.

I really appreciate the help. This is the third character controller I've tried (first in playmaker)and the closest to what I need.
« Last Edit: December 10, 2012, 03:49:04 AM by MajorIdea »

goliath520

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Character looks in one direction and flies in another.
« Reply #3 on: December 06, 2012, 11:13:16 PM »
is the force in space.world instead of space.self? if it is using forward you want to make sure its locked to the object its self or it will continue in the direction no matter what. (I am taking a shot in the dark, can't watch videos here.)

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Re: Character looks in one direction and flies in another.
« Reply #4 on: December 07, 2012, 08:44:10 AM »
Yea, its space self. I'm using a physical property (AddForce) to propel it and the result of that force is the momentum I need to control.
What I really want though, is that ease out motion we get from physical forces. I can control it better with a simple Move but the problem is that when I let go of the key, it comes to a dead stop. Not natural at all. I've even tried iTweew's fade out to no avail.

Maybe it's not possible to control momentum with Playmaker? Like - check player orientation - check player movement - if player movement = player orientation - do nothing || if player movement is diferent than player orientation - change movement.
Or something like that? It's my first time with playmaker  :-\