Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jongkook on June 02, 2018, 07:45:37 AM

Title: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 02, 2018, 07: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?

(http://taking9.cafe24.com/Jitter_QA.jpg)

Unity : 5.5.5p2
Playmaker : 1.9.0
2D Toolkit : 2.5.8.9
Test Device : iPhone 6S, 7 Plus
Title: Re: Camera jitter(stutter) problem in runner game
Post by: djaydino on June 02, 2018, 08: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.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 03, 2018, 03:12:37 AM
I tried it.
But I want to move only horizontally.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: djaydino on June 03, 2018, 05: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 :)

Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 05, 2018, 01:33:31 AM
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?
Title: Re: Camera jitter(stutter) problem in runner game
Post by: djaydino on June 05, 2018, 11: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.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 06, 2018, 06:48:20 AM
In my case, when I set fixed update, my character trembled.
I sent a message about the project file.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: djaydino on June 06, 2018, 05: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.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 09, 2018, 06: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?
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 11, 2018, 07:40:25 AM
Is it not appropriate to use the 'set velocity' action to implement runner movement, jump-related logic?
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 14, 2018, 07: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.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: DanielThomas on June 14, 2018, 10: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)
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 14, 2018, 03: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.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: DanielThomas on June 14, 2018, 03: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.
Title: Re: Camera jitter(stutter) problem in runner game
Post by: jongkook on June 15, 2018, 04:17:39 AM
I think I should give up the runner game and study a different kind of game.  :(