playMaker

Author Topic: Jerky movement again using physics/smooth look at direction  (Read 2703 times)

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
Jerky movement again using physics/smooth look at direction
« on: January 20, 2014, 09:28:37 PM »
Hi guys,
I'm recreating an old game prototype from scratch, and funnily enough its very similar to a problem I was having originally here: http://hutonggames.com/playmakerforum/index.php?topic=862.msg3540#msg3540

I've got the player orbiting a planet by doing as Alex advised, by taking the player position and subtracting the planets position, and applying force in that direction. Previously, in the original game, that seemed to fix it, however now in this new version, I still seem to have some jerky motion.

The game in this state is super simple, so there's nothing else running at the same time other than an FSM that controls the gravity (as just described) and another which controls the players orientation, so that they always look down on the planet no matter which position the player is around the planet.

After writing this, I've just turned off this orientation/look at FSM, which uses a smooth look direction to look at the velocity of the player, which has "solved" it. Of course, I need something like this, so I need a work around or a different set of actions that produces the same effect with no jerkiness.

I've attached the FSM and actions that causes it in a screen shot in case anything sticks out.

Does there perhaps need to be another action for smooth look at which has another form of update type? Ie fixed update or something like that? Or is the way that smooth look at work just not work with a kind of spherical planet/looking setup that I have here?

Thanks for any thoughts!
Regards,
Jay

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jerky movement again using physics/smooth look at direction
« Reply #1 on: January 21, 2014, 03:20:56 AM »
Hi,

 Are you testing with the published version or within the editor?

Bye,

 Jean

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
Re: Jerky movement again using physics/smooth look at direction
« Reply #2 on: January 21, 2014, 04:28:08 AM »
Tested both, and both are jerky.

Removing the smooth look at direction stuff is the only thing that seems to fix it.

I can upload a youtube video with the problem if that helps.

Regards,
Jay

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
Re: Jerky movement again using physics/smooth look at direction
« Reply #3 on: January 21, 2014, 07:06:15 AM »
Hi Jean,
Here's a video of the problem if it helps:

Cheers,
Jay

jayhfd

  • Junior Playmaker
  • **
  • Posts: 71
Re: Jerky movement again using physics/smooth look at direction
« Reply #4 on: January 22, 2014, 09:53:46 PM »
Still unable to figure this one out. In the mean time, changing Fixed Timestep to .01 and Max Allowed Time to 0.1 seems to have provided a work around for now. I think this is going to kill performance in the long term though so its probably not a good solution?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jerky movement again using physics/smooth look at direction
« Reply #5 on: January 30, 2014, 04:39:14 AM »
Hi,

 Can you send me that project? I'll have a look, I am sure it's a question os update call to switch to FixedUpdate, but I will need to mess with the actions to testify properly.

bye,

 Jean