<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />
Navigation
</aside>
<aside>
💡 LevelSetup defines the objects that GameController spawns around the character for a level: the launcher, the aim input type, the launch ramp, the finish flag and the record wall.
</aside>

Menu: Create → Watermelon → Progression → Level Setup.
| Field | Description |
|---|---|
| Launcher Prefab | The launcher prefab. Spawned once per GameController load. |
| Aim Input Type | Drag or Timing. Selects the aim input that is enabled in the Game scene. |
| Play Launch Animation | Timing input with a slingshot only. After the tap, the slingshot pulls back to the chosen power and fires. When disabled, the character launches on the tap. |
| Launch Animation Duration | Duration of the pull animation. |
| Launch Ramp Prefab | Optional. Placed at the Start Point. The launcher and the character stand on its Launch Point. |
| Character Behind Launcher | Distance between the character and the launch point, so the rope already wraps the character back at rest. |
| Flag Prefab | Flag shown at the end of the run. |
| Record Wall Prefab | Wall shown at the record distance. |
A level that has no Setup Override uses the Default Level Setup from Game Data. See Level Asset & Levels Database.
| Asset | Launcher | Aim input | Ramp |
|---|---|---|---|
| Default Level Setup | Slingshot Launcher | Drag | None |
| Car Level Setup | Slingshot Launcher Car | Drag | None |
| Plane Level Setup | Slingshot Launcher | Timing | Launch Ramp |
Launcher, flag and record wall prefabs are stored in Assets/Project Files/Game/Prefabs/Level Setup.
GameController has a reference to every AimInput of the Game scene. At Awake, it enables the input whose Type matches LevelSetup.AimInputType and disables the others. The list is filled when the Game scene is saved.
An aim input reports three values, from 0 to 1 (the third one from -1 to 1):
| Value | Drag | Timing |
|---|---|---|
| a | Pull tension | Power |
| b | Launch angle, same as the tension | Power |
| c | Side direction | 0 |
| Input | Behavior |
|---|---|
| AimDragInput | The player drags down from the first touch. The pull sets the tension and the angle, the sideways drag sets the side direction in the opposite direction, like a real slingshot. A release with a pull below Min Launch Tension is cancelled. |
| TimingAimInput | A needle swings over an arc. A tap locks the position as power. The power is the highest at the center of the arc. |
Events of AimInput:
| Event | When |
|---|---|
OnAimChanged(a, b, c) |
The player changes the aim. Drives the slingshot visuals. |
OnAimReleased(a, b, c) |
The player confirms the launch. |
OnDragStateChanged(bool) |
Drag start and end. Used to hide the UI while pulling. |
All launchers share these fields from the Launcher base class:
| Field | Description |
|---|---|
| Muzzle | Launch point. |
| Min Force, Max Force | Launch force range. |
| Visual Root, Default Visual | Optional objects used to swap the visual with the launcher power upgrade. |
The launch velocity is multiplied by the Launcher Power upgrade multiplier of the current level.
| Launcher | Behavior |
|---|---|
| SlingshotLauncher | The tension sets the force, the angle value is mapped to Min Angle…Max Angle, the side value turns the launch up to Max Yaw. The rope is a physics chain that wraps the character at the Rope Point. |
| TimingLauncher | The power sets the force. The angle is fixed by the Angle field. |
The slingshot rope wraps the Rope Point of the character visual. See Characters & Vehicles.
The root of the ramp prefab has LaunchRampBehavior. Its pivot is placed at the Start Point. The Launch Point child defines the position and the tilt of the launcher and the character on the ramp deck.
Launcher and implement GetLaunchVelocity().GameController calls the extra methods only for SlingshotLauncher (load, aim, release) and TimingLauncher (power). Any other launcher is used through GetLaunchVelocity(). Pass the values of the aim input to the launcher in Launch of GameController when the new launcher needs them.
AimInputType.AimInput, return the new type and raise the events.GameController is filled on scene save.