playMaker

Author Topic: Camera jitter(stutter) problem in runner game  (Read 759 times)

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Camera jitter(stutter) problem in runner game
« on: June 02, 2018, 04:45:37 AM »
I'm making a runner game.
I use 2d images but I am using 3D physics, collision systems.
Character and camera tremble during gameplay.
Jitter occasionally occurs when a character moves smoothly. (Especially when jumping and landing)

Below is the FSM setup image.
Is there a problem with the settings below?



Unity : 5.5.5p2
Playmaker : 1.9.0
2D Toolkit : 2.5.8.9
Test Device : iPhone 6S, 7 Plus

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: Camera jitter(stutter) problem in runner game
« Reply #1 on: June 02, 2018, 05:35:00 AM »
Hi,
Have you tried the 'Smooth Follow' Action?

There is also an action on the Ecosystem called 'Camera2d Smooth Follow' maybe that one is even better.

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #2 on: June 03, 2018, 12:12:37 AM »
I tried it.
But I want to move only horizontally.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: Camera jitter(stutter) problem in runner game
« Reply #3 on: June 03, 2018, 02:45:52 PM »
Hi,
You can try to set the update type to fixed update

I also updated the action 'Camera2d Smooth Follow' so that you can select x or y to follow (or both of course)
 if you wish to use some smooth folow :)


jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #4 on: June 04, 2018, 10:33:31 PM »
Thank you for answer. However, I tried the Camera2d Smooth Follow script, but the problem is not solved. Is it wrong to set up an action like that in a runner game that uses a rigid body?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: Camera jitter(stutter) problem in runner game
« Reply #5 on: June 05, 2018, 08:21:32 AM »
Hi,
Did you set it to fixed update?

Can you show some images from your setup (fsm/states/actions/issue) or a video.

If you want you can pm me a link to your project (or use collaborate) so i can have a look.

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #6 on: June 06, 2018, 03:48:20 AM »
In my case, when I set fixed update, my character trembled.
I sent a message about the project file.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: Camera jitter(stutter) problem in runner game
« Reply #7 on: June 06, 2018, 02:57:28 PM »
Hi,
You should separate the horizontal movement onto a different fsm

I made a build on pc to test (in editor you can always have some lag for several reasons)
But i think there is still some issue on landing sometimes.

But i do not think that it is caused by the camera action.

i never used 2d toolkit yet so i can't say if there is an issue there or somewhere else.

Can you try on your end to separate the horizontal movement if it improves, also try to set the angular drag to 0 on the ninja.

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #8 on: June 09, 2018, 03:48:17 AM »
I tried the way you answered, but the problem can not be solved.

http://hutonggames.com/playmakerforum/index.php?topic=10712.0
I tried the "Set Position Advanced" action as described in the link, but it was not resolved.

This is not a 2d toolkit issue, because the same problem occurs without the 2d toolkit.

Is the character movement and jump logic itself wrong?

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #9 on: June 11, 2018, 04:40:25 AM »
Is it not appropriate to use the 'set velocity' action to implement runner movement, jump-related logic?

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #10 on: June 14, 2018, 04:07:19 AM »
The link below is a coding scripting runner game tutorial from Unity.
https://unity3d.com/kr/learn/tutorials/topics/scripting/lets-make-game-infinite-runner
I tried the tutorial and it works smoothly.
(Sometimes there are fine stutter phenomena, but they usually work well.)
However, as a playmaker, a constant stutter occurs.

DanielThomas

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 92
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #11 on: June 14, 2018, 07:43:14 AM »
Is it an actual performance stutter or something wonky with the camera/playmaker?
If it's performance, does it do the same when you build? (so it's not playmaker editor window)

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #12 on: June 14, 2018, 12:14:55 PM »
I do not know exactly what caused the problem.
The same problem occurs on iPhone 6S and iPhone 7 Plus.
I have tried many, but I can not solve it.
I have been contacted by the Unity team and I am waiting for an answer, but I'm not sure I get the answers I want.
They do not seem to be using playmakers well.

DanielThomas

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 92
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #13 on: June 14, 2018, 12:17:00 PM »
Can't you use Unity profiler to look if there are performance peaks and what causes them?
If none you can atleast rule that out.

jongkook

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Camera jitter(stutter) problem in runner game
« Reply #14 on: June 15, 2018, 01:17:39 AM »
I think I should give up the runner game and study a different kind of game.  :(