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.

Quote
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.

https://answers.unrealengine.com/questions/487337/spring-arm-rotation-lag-flip-at-90-pitch.html

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 ... "

Subscribe to the Solar Warden Newsletter

Solar Warden on Social Media

Facebook

Twitter


YouTube


Reddit

Join Live Chat on Discord

Solar Warden on IndieDB

Solar Warden
  • Utility spacecraft
    June 14, 2018
    A tugboat like craft (maybe variant(s)s of the H.U.R.K. transport?) built for dedicated reclaiming of resources, destroyed Warden craft and Silicoid husks, pilots and API boxes that successfully eject from destroyed Warden craft, and moving satellites ...
  • Artificial Pilot Intelligences
    June 14, 2018
    APP or API - artificial pilot personality or artificial pilot intelligenceFielded after research into artificial intelligence nets the necessary breakthroughs, artificial pilot computer systems could be installed into Warden craft to function as human...
  • Shell company space-missions
    June 14, 2018
    The idea: using shell companies for deploying civilian cargo into space to make money on the side. Such missions could also use transport craft to get other, more important resources into space.  Thus with limited transporters the commander would have ...
  • Asteroid-based resources
    June 14, 2018
    The idea is that resources could be reclaimed from asteroids that Silicoid arrive in, are sent to distract fire in a Silicoid rush/damage Earth's surface, or end up on a course to just pass by.H.U.R.K. transports could be deployed to carry a mining la...
  • Welcome to Solar Warden Forums
    June 5, 2018
    “According to theories, Solar Warden is an ultra-secret project that maintains a fleet of spacecraft that are operating primarily within Earth’s Orbit and around our solar system. Some say they’re defending us against alien threats.” – Jonathan Marc...
  • Re: Capital ships humans-aliens
    February 17, 2018
    OMG you just make me happy to hear that ty agent for the replay beautiful i can't wait to play your game 
  • Re: Weapons rarity alien containers and Bosses
    February 17, 2018
    ty for the replay is sounds good can't wait to see what the game hase to offer once it is realised
  • Re: Capital ships humans-aliens
    February 16, 2018
    Thanks for the support!To answer your first question. We do have ships that are larger than the fighters which are the "Corvettes". They are much slower in handling, but pack quite a punch with their multiple turret mounts as well as larger weapons yo...
  • Re: Weapons rarity alien containers and Bosses
    February 16, 2018
    No worries, your English is fine .We don't believe in an RNG loot drop system as we feel that it pulls Players out from the immersion factor and reinforces a more "gambling style" reward, rather than a hard work pay off. However there is still RNG, ...
  • Weapons rarity alien containers and Bosses
    February 13, 2018
    Hello all me again any plans for Weapons rarity and alien contaners for the game for as example alien contaners where you need to hack the container to get a RNG alien Weapon rarity ore armor parts from tier 1-5 Killing a alien boss to get the weapo...

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