playMaker

Author Topic: Camera jittering when moving  (Read 5710 times)

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Camera jittering when moving
« on: February 22, 2020, 04:20:39 PM »
I have been working on this FPS game. I started to see that when I move my character, while rotating and while keeping an object centered to the screen, the camera jitter.

When I move  on the X or Z axis I have no issue but when I start rotating the camera the jitter start.

My camera is attached (a child) to the gameobject who move. The gameobject has a character controller + a mouse look for the rotation of the camera. I am using translate to move on the XYZ vector of the map.

I have a video to show it.

(I'm not sure if its related to playmaker or unity, but I could not find anything after few hours of videos and forums)


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Camera jittering when moving
« Reply #1 on: February 23, 2020, 09:59:11 AM »
Hi.
Usually this is a update type issue, check if your update type on rotate and translate is in fixed update.

Also in most cases it is better to have the camera separate and let it follow the player with get/set position

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #2 on: February 23, 2020, 03:37:49 PM »
Thanks for the reply, I have putted everything on fixed update or late update and even without update the issue still occurs. I detached my camera from the capsule and set up get/set position so the camera can follow the capsule.

The issue keep occurring but with more jittering!

I dont know if its because I use mouse look or the fact that I need to use rigid body or a Character Controller component?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Camera jittering when moving
« Reply #3 on: February 24, 2020, 03:28:50 AM »
Hi,

 get and set position are not using lateupdate, you need to use the custom actions GetPositionAdvanced and SetPositionAdvanced for this.

Bye,

 JEan

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #4 on: February 24, 2020, 08:26:26 PM »
I used the get position advance and set position advance with get/set rotation advance. All set to on update, all set to every frame and I still got the jittering when turning around an object. I even try to put them all late update or fixedupdate and it didn't work.

I also change my translate for the advanced one. I get my axis with Get Axis Vector and camera is still a Mouse Look. Everything is set to self space and the camera is not attached to anything.

I watched some "How to set up FPS controller with playmaker" videos on youtube before posting here my issue and they all had this issue in their videos.

 :'(

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Camera jittering when moving
« Reply #5 on: February 24, 2020, 10:30:45 PM »
Hi.

On update is not a good setting for physics, most of the time fixed update gives the best result.

If you look in scene view, do you see jittering? if so then there is something else wrong.
if not then its a camera refresh issue (update issue)

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #6 on: February 24, 2020, 10:44:03 PM »
I tried all of them on update, fix update, etc...

In the viewport with top down view, its smooth but when I press play and go in FPS mode the camera jitter when rotating. I try to put a rigid body or a character controller and the issue still persist. on the viewport

(Fix Update makes the jittering worst...)

I think it's the Mouse Look the issue but I cant set it up On update, Fixe update etc...

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #7 on: February 26, 2020, 09:22:40 PM »
Do we have a way to make the mouse look to Fix update?

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #8 on: February 27, 2020, 11:19:27 PM »
So I got a camera script on a random forum "smooth mouse look" and the issue was fix!

Playmaker is the issue and the mouse look action is causing the jittering whatever what I do. I disable the mouse look action on the camera and the smooth movement was working from the script but when I turn off the script and enable the mouse look from playmaker, the camera was jittering.

It would be nice that you guys could make a mouse look smooth action or something that will smooth the rotation while moving. :)
« Last Edit: February 27, 2020, 11:45:40 PM by hellzer »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Camera jittering when moving
« Reply #9 on: February 28, 2020, 12:22:42 AM »
Hi.
Can you link the script, i can see if i can convert to a single action.

you can actually achieve this but with multiple actions, but it might be better if it can be done i 1 action.

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #10 on: February 28, 2020, 10:08:28 AM »
So what I would like to have for me and the community is a mouse look that smooth itself without using other actions with playmaker.

The script has a smoothing effect but it's not a general one and it was for a FPS specific game.

It would be appreciate if you could look into the script and mix it with the Mouse Look action to create a General Smooth Mouse Look action.

The script has a weird feeling of rotation but it fix the jittering issue when moving my capsule character and rotating the camera.
« Last Edit: February 28, 2020, 10:10:53 AM by hellzer »

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #11 on: March 04, 2020, 09:12:52 PM »
Bump

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Camera jittering when moving
« Reply #12 on: March 06, 2020, 03:36:44 AM »
Hi,

 I'll have a look next week, please bump me mid week ok? thanks.

Bye,

 Jean

hellzer

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Camera jittering when moving
« Reply #13 on: March 17, 2020, 06:15:25 PM »
I dont know if I was supposed to send you a private message or bumping you are?

Bump

(I already sent you a private message)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Camera jittering when moving
« Reply #14 on: April 09, 2020, 03:21:12 AM »
Hi,

 sorry, running behind, you are on my todo :)

Bye,

 Jean