Home // Blog // Development Update: 01/29/2017 – Completely Custom Spring Arm and Aim Bug

Man… I just have to say… SCREW THE CAMERA SPRING ARM LAG. So I’ve been running into a few problems with the Spring Arm Component and it’s Lag functions. Seemed like a few things weren’t very well thought out when they made this. Especially for anything with flight.

The First thing was the issue with the Gimbal lock on the +90/-90 rotational polar coordinates. I was seeing the ship wobble when I was trying to get the camera to follow the ship when reaching this polar coords and causing this…

Fortunately I found the thread that has this gif and understood what the author said his work around was.

I made a simple workaround by plugging the actor’s inverted local rotation delta with an RInterpTo into a setRelativeRotation for the spring arm to fake camera lag instead.


I didn’t actually use the RInterpTo because I prefer my Lerp+Timestep method to control it (Probably same way of doing it but w/e). What he was missing and what I was also doing with the lag was adding in roll and such to the rotation, which means I needed to also combine the current Ship Rotation Delta to the Roll Delta and it gave me the result I wanted.

I also applied this to the Weapons rotations and went back to a local rotation which fixed a lot of the Roll issues with the weapons. This means they follow the ship properly and also combine with the Spring Arm’s Relative Rotation to get the proper aim location. Wooo another win!

BUG: One bug with this though as a side effect. The Addition of the Roll on the ship causes the aim offset to not quite match up to where the weapons are shooting and causes a dip in the weapons aim.

I was trying to reverse calculate this when making an isolated rotation experiment in Max, but I wasn’t really able to mathematically come up with a formula to compensate for the local rotational reversal on the Aim Dip. I’ll need to look at this bug later when I have a better understanding of Rotational Offsets or find someone more mathematically inclined to help me.

As for the Camera Lag movement, I was seeing some awful use with the Camera and the compounding problem of trying to sub-step the tick. With performance drops, the update wasn’t in line with the Actor’s movement, which usually meant that the Camera was trying to guess where the actor was and the result was never really 100% accurate. From the User’s perceptive, the Ship was jittering with lag back and forth in the direction of the movement delta. Trying to mitigate this, Unreal has a “Sub-stepping” float that’s exposed which just basically tries to update the camera within this time step when more frames are processed (which is even more expensive! And still never 100% accurate). The better way of dealing with this is to sync up with your actor’s tick and update the Spring Arm position yourself in BP. This eliminates any terrible lag seen because both Spring Arm and Actor are updated on the same frame rather than this lag shit to try and guess where the actor is.

I did this by using the same inverse position theory as the Rotational one I did above. Basically inverting the Actor’s Local movement delta and applying it to the Spring Arm. And BAM! Works. This is great because now you will never see any sort of position jitter as both the Spring Arm and Ship are now updated in the same frame.

Great Success!

0 Comments ON " Development Update: 01/29/2017 – Completely ... "

Solar Warden on IndieDB

Solar Warden

Solar Warden on Social Media





Join Live Chat on Discord

  • No topic this week
    September 5, 2017
    TRUTHERS, PATRIOTS, AND NON BELIEVERS!!!I come to you with exciting news!I'm not going to be able to post today!  (well other than this one, I mean.)But that isn't inherently exciting, in and of itself.  If anything, that's kind of depressing.  Afte...
  • Warp Factor 9
    August 22, 2017
    TRUTHERS, PATRIOTS, AND NON-BELIEVERS!!!WARP DRIVES!!!I didn't want to cover these last week at all.  Talk about theoretical tech that I just won't be able to wrap my ...
  • Speed and Distance
    August 5, 2017
    TRUTHERS, PATRIOTS, AND NON BELIEVERS!!!First, allow me to humbly apologize, dear readers.  I know many of you expect a post a week and I did not deliver last week. Worry not.I was not abducted.I ...
  • Re: The Song of the day Thread
    July 29, 2017
    World's fastest talking man sings Michael Jackson's BAD in 20 seconds//www.youtube.com/watch?v=4X4Fy8YqysY
  • Re: The Song of the day Thread
    July 25, 2017
    Wintersun - The Forest That Weeps (Summer)//www.youtube.com/watch?v=ffQ2B5qegRg
  • The Fermi Paradox and Civilization Types
    July 24, 2017
    TRUTHERS, PATRIOTS, AND NON BELIEVERS!!!Okay, friends.  Alright.  I heard you.  Loud and clear.Earlier this week, after posting "Meteors... or Something More???", I received a plethora of emails to e...
  • Re: The Song of the day Thread
    July 18, 2017
  • Meteors... or Something More???
    July 16, 2017
    TRUTHERS, PATRIOTS, AND NON BELIEVERS!!!! WE ARE BEING EXTERMINATED!!!! How can one avert their eyes from the palpable destruction and our seemingly neglectful governments ...
  • Re: The Song of the day Thread
    July 14, 2017
  • Re: Ancient buildings or crafts
    July 12, 2017
    awesome look forward to see these different technologies

Polar Zenith Copyright © 2017 Polar Zenith, LLC. All Rights Reserved.