playMaker

Author Topic: Jerky camera with quaternion slerp  (Read 4428 times)

MattBradley

  • Playmaker Newbie
  • *
  • Posts: 25
Jerky camera with quaternion slerp
« on: October 27, 2015, 04:19:59 AM »
Hi there,

I'm having a bit of trouble getting my camera to rotate smoothly.

I'm trying to get it to constantly rotate to the players rotation, but with a slight delay so it feels like its being pulled a little by the player. In the scene view it looks perfect, but in the game view there is a really bad stuttering when the player reaches what appears to be the camera extents. It's like the camera can't update its position fast enough to keep smoothing.

I made a little gif to show what I mean:


And my actions are as follows:


Anyone have any ideas?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jerky camera with quaternion slerp
« Reply #1 on: October 27, 2015, 06:02:09 AM »
Hi,

 you are getting the rotation on regular update, you need to use a new action I just created on the Ecosystem GetRotationAdvanced.


Try with this one and set it to fixed update too.

 Bye,

 Jean

MattBradley

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Jerky camera with quaternion slerp
« Reply #2 on: October 27, 2015, 02:20:54 PM »
Hey Jean,

Thanks for the reply and action! I've just tried it out and I'm still seeing the same problem.

Set rotation is likely happening outside of fixed update, could that be it?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jerky camera with quaternion slerp
« Reply #3 on: October 28, 2015, 07:55:42 AM »
Hi,

 yes, there is this one too. Make it on late update and try.

 Bye,

 Jean

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Jerky camera with quaternion slerp
« Reply #4 on: October 28, 2015, 11:34:22 AM »
Its still probably glitchy even with Set Rotation in Late Update. Fixed Update is intermittently between Updates so waiting for Update to finish may help but probably isn't necessarily going to smooth it out.

Isn't there a Set Rotation Advanced with the toggle for operating in FixedUpdate? Both in Fixed would be ideal.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

MattBradley

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Jerky camera with quaternion slerp
« Reply #5 on: October 29, 2015, 03:31:12 AM »
Lane's right, even in late it still has some stuttering. It's better when ran in standalone, but I figure that's to do with a higher, more consistent framerate than anything else.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jerky camera with quaternion slerp
« Reply #6 on: October 30, 2015, 01:48:21 AM »
Hi,

 Ok, I made a SetRotationAdvanced action ( On the Ecosystem). Try this one set to FixedUpdate.

 these jerky bugs are all solveable, it's simply because of the decoupled physics engine update and the Unity own update, so there is always a way to get a smooth results without relying on stable fps, which is unreliable.

Bye,

 Jean

MattBradley

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Jerky camera with quaternion slerp
« Reply #7 on: November 04, 2015, 02:27:26 AM »
Thanks Jean!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Jerky camera with quaternion slerp
« Reply #8 on: November 04, 2015, 07:57:25 AM »
Hi,

 so that worked?

 Bye,

 Jean