# USS Documentation

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FxTfFAu3zoC3fAgRGqH11%2Fimage21.png?alt=media" alt=""><figcaption><p>Landed Spaceship</p></figcaption></figure>

## <mark style="color:blue;">**Zero Gravity Flying movement**</mark>

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

## <mark style="color:blue;">**Animation features**</mark>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2Fe9bjMMrA8JxTS6QHksUG%2Fimage17.png?alt=media" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FIMhd63nLElurndTOi9Zd%2Fimage15.png?alt=media" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FETQBsYmMhOXn6Lpx4T8z%2Fimage20.png?alt=media" alt=""><figcaption><p>Cockpit</p></figcaption></figure>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FbAOuqTnV6xG2iGAM7uwO%2Fimage19.png?alt=media" alt=""><figcaption><p>Landing Gears IK</p></figcaption></figure>

Landing gear comes with an IK system to adjust feet to stand on different terrain geometry.

## <mark style="color:blue;">**Animated interior screens**</mark>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FqZBFLdfeneRbJ0dY6Q00%2Fimage2.png?alt=media" alt=""><figcaption><p>Animated Interior Screens</p></figcaption></figure>

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.

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FCxHLEEYdo1POO3D9Nj6Z%2Fimage1.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FcqONi2oszp9h7b6CQVTU%2Fimage3.png?alt=media" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">**Energy distribution minigame**</mark>

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)\ <br>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2F4pTfdaUdj8xaSPnpB3Pj%2Fimage5.png?alt=media" alt=""><figcaption><p>Energy Minigame</p></figcaption></figure>

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)

&#x20;               <br>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FVtOxkbbwfAgeXaEEiAfD%2Fimage4.png?alt=media" alt=""><figcaption><p>Cannons</p></figcaption></figure>

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. &#x20;

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2F3dx8062LQQC0utfTZjXc%2Fimage13.png?alt=media" alt=""><figcaption><p>VFX Blueprint</p></figcaption></figure>

When each individual shot is created (VFX spawned), it gets assigned a BPCallBackHandler variable which is later used to trigger the Impact VFX.

## <mark style="color:blue;">**Laser shot**</mark>

impact event and collision check happen within the Particle system<br>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FiqsWfcLukKA8uIgBPl7E%2Fimage12.png?alt=media" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FBS8rOLUzmg4m9PCHWXwT%2Fimage11.png?alt=media" alt=""><figcaption></figcaption></figure>

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.

## <mark style="color:blue;">**Weapon Systems (Guided Missiles)**</mark><br>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FH7qsQ2a9C3ct2MIDMLZv%2Fimage10.png?alt=media" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FJixxydHvd76LMJfSeLwk%2Fimage9.png?alt=media" alt=""><figcaption></figcaption></figure>

Missile Lock on Angle is based on where the Spaceship is facing, it can be adjusted within Calculate&#x20;

## <mark style="color:blue;">**Missile Lock Angle function**</mark>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FI0uN4qGzkKt29n1gOL5t%2Fimage8.png?alt=media" alt=""><figcaption></figcaption></figure>

Missiles only lock onto valid targets which have BPI\_Enemy interface implemented

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FpZCbqx3PDkjKL7ZWYc1g%2Fimage7.png?alt=media" alt=""><figcaption></figcaption></figure>

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

## <mark style="color:blue;">**Automatic landing and liftoff**</mark>

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FVDHYBVft2rGoLF631VPP%2Fimage6.png?alt=media" alt=""><figcaption></figcaption></figure>

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)

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FiWkUTiqxR1hOJ1Or2PQi%2Fimage18.png?alt=media" alt=""><figcaption><p>Landing Sequence Bar</p></figcaption></figure>

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

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FJxAtY2MP9KpItLNLl6cf%2Fimage16.png?alt=media" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">Support</mark>

{% hint style="info" %}

## Stuck? Need Support? Please join our [<mark style="color:purple;">Discord</mark>](https://discord.gg/zaKb8tWSxw) And Open A Ticket.

{% endhint %}

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivemind3d.io/code-systems/ultimate-spaceship-system-uss-knowledge-base/uss-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
