USS Documentation
Last updated
Last updated
6 DOF movement allows precise navigation, enabling it to maneuver freely in pitch, yaw, roll, and linear axes without any gimbal locks. It works both with mouse and keyboard and with a controller (currently only supports Xbox controller)
Movement is built on a derivative version of standard Epic's Character Movement, using flying movement as a base and utilizing directional vector impulses for propulsion.
Current version of the movement is designed for Zero gravity space travel, however with some modification to thrusters to provide some counter force to gravitational pull it could work as planetary flying movement.
This package supports flying in 1st person cockpit view and 3rd Person mode paired together with a fully functional flying HUD.
Spaceship comes with an ABP setup that includes parameters to control both interior and exterior parts of the ship allowing a wide range of animations. Most of the animations are controlled directly through code scripted directly within ABP.
This includes exterior animations to rotate the engines, control engine jet plume size, wing flaps, railgun turret rotation, roof turrets and front phasers As well as interior animations for opening airlocks, doors and rotating captains chair in the cockpit.
Landing gear comes with an IK system to adjust feet to stand on different terrain geometry.
Spaceship interior comes with Widget Blueprint for each screen. They are all animated to improve the immersive experience when flying in 1st person mode, however only the speedometer, and energy distribution monitor is connected to actual gameplay.
In case you want to add additional functionality for your own custom needs, each of the WBP is located in Widgets folder under Blueprints.
This package comes with energy minigame that allows you to power different systems (Phasers, Railgun, Thrusters and Shields) allowing you to boost their performance.
You can adjust power levels for each section by using Arrow keys (
keyboard) or left side face buttons (gamepad)
Current version of power minigame powers each section in this way:Phasers - Increases energy reserve (magazine size) and how quickly it regeneratesRailgun - Increase Fire Rate (and reload speed) of the railgun turret
Thrusters - Empowers propulsion power when free flying and Energy reserve and regeneration rate when using Boosters (Shift) Shields - Increases shield generator capacity and regeneration rate. Doesn't have any other gameplay applications besides this since there are no actual enemies in this package. Weapon Systems (Phasers and Railgun)
Current version of the ship comes with a Railgun turret, 2x Roof turrets (phasers) and 2x Front Phasers. They are all connected to their respective energy reserves within energy minigame framework.
Energy weapon implementation is quite simple. They are connected to Energy (magazine) logic and once the fire input is triggered they shoot until ammo is gone.
Each gun is using a 2 Niagara's VFX systems. 1 for Muzzle and 2nd one for the actual projectile.
When each individual shot is created (VFX spawned), it gets assigned a BPCallBackHandler variable which is later used to trigger the Impact VFX.
impact event and collision check happen within the Particle system
Upon particle collision, this Callback event fires back to the BP_Spaceship At which point, we use Particle Size parameter (extracted from Particle Data Struct) to determine which particle it is and play appropriate impact VFX at that location.
Since we use only 2 different weapons. 1 is set to have its size at 0 and other 1 thus a simple branch checking if Size is > 1 is used to distinguish which VFX system made the callback call.
Unlike previously covered weapons, missile system actually spawns a missile actor with his own tracking and movement logic that seeks out the target and detonates when within proximity.
Missile Lock on Angle is based on where the Spaceship is facing, it can be adjusted within Calculate
Missiles only lock onto valid targets which have BPI_Enemy interface implemented
And each potential target has to have both Spawn target lock and Clear target lock events implemented to spawn and clear the BP_Missile_Lock
One of the core features of this pack is automatic landing and lift off system.
The way it works, is that it temporarily pauses user input, and takes over control of directional and rotational roll thrusters and steers the ship into a clean assent when taking off or lands the ship down while keeping it steady and well balanced as well deploying the landing gears. In order to trigger auto landing or Lift off, you have to position close enough to a surface that ship can fit onto, decelerate or stop entirely and hold [T] There are scenarios where Landing sequence will fail, or will attempt to initialize but then cancel out spitting an Error and return back to standard flying mode.
It happens when the Landing Sequencer fails to find a suitable landing spot that could fit entire ship (one or more landing gear legs cannot find a surface to stand on) Or if the ship floated away from initially suitable surface (likely when ship continues to move while attempting to land)
Intensity of initial landing / take off power can be adjusted in this area of BP_Spaceship In order to adjust it, change the strength of the vector that gets fed into Replicated Mesh Impulse function.