Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# Changelog
## v0.8.0 - 2026-01-19
### 🐞 Fixes
- [Patch] Fixed demo game (d1db248…)
- [Patch] added flag to bypass post-procesing (edecb29…)
- [Patch] Updated the demo game to bypass post-fx (fcea465…)
- [Patch] Formatted game demo main (2afb46d…)
- [Patch] set animation playback speed (181b81e…)
- [Patch] added j and k keys to input system (c42ee76…)
- [Patch] Improve steering pursuit (b431051…)
- [Patch] Improve steering pursuit to have an offset (6ed6595…)
- [Patch] added a camera dead zone behavior (5c898e8…)
- [Patch] remove animation playback from sereializer (c51b7d2…)
- [Patch] fixed crash with loading scene with async (407ba24…)
- [Patch] added support for gamepad for more keys (c6882a6…)
### 📚 Docs
- [docs] added game controller input docs (3e63c82…)
### 🚀 Features
- [Feature] Added camera waypoint system (9cec140…)
## v0.7.1 - 2026-01-10
### 🐞 Fixes
- [Patch] Added a profiler to the engine (6be0955…)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
id: asyncloadingsystem
title: Async Loading System
sidebar_position: 9
---

# Async USDZ Loading System - Usage Guide

## Overview
Expand Down
144 changes: 144 additions & 0 deletions docs/04-Engine Development/03-Engine Systems/UsingCameraSystem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
---
id: camerasystem
title: Camera System
sidebar_position: 10
---

# Using the Camera System

This document explains how to move, rotate, and control cameras using the APIs in `CameraSystem.swift`.

## Get the Game Camera

For gameplay, always use the game camera (not the editor/scene camera). Call `findGameCamera()` and make it active:

```swift
let camera = findGameCamera()
CameraSystem.shared.activeCamera = camera
```

If no game camera exists, `findGameCamera()` creates one and sets it up with default values.

## Translate (Move) the Camera

Use absolute or relative movement:

```swift
// Absolute position
moveCameraTo(entityId: camera, 0.0, 3.0, 7.0)

// Relative movement in camera local space
cameraMoveBy(entityId: camera, delta: simd_float3(0.0, 0.0, -1.0), space: .local)

// Relative movement in world space
cameraMoveBy(entityId: camera, delta: simd_float3(1.0, 0.0, 0.0), space: .world)
```

## Rotate the Camera

Use `rotateCamera` for pitch/yaw rotation, or `cameraLookAt` to aim at a target.

```swift
// Rotate by pitch/yaw (radians), with optional sensitivity
rotateCamera(entityId: camera, pitch: 0.02, yaw: 0.01, sensitivity: 1.0)

// Look-at orientation
cameraLookAt(
entityId: camera,
eye: simd_float3(0.0, 3.0, 7.0),
target: simd_float3(0.0, 0.0, 0.0),
up: simd_float3(0.0, 1.0, 0.0)
)
```

## Camera Follow

Follow a target entity with a fixed offset. You can optionally smooth the motion.

```swift
let target = findEntity(name: "player") ?? createEntity()
let offset = simd_float3(0.0, 2.0, 6.0)

// Instant follow
cameraFollow(entityId: camera, targetEntity: target, offset: offset)

// Smoothed follow
cameraFollow(entityId: camera, targetEntity: target, offset: offset, smoothFactor: 6.0, deltaTime: deltaTime)
```

### Dead-Zone Follow

`cameraFollowDeadZone` only moves the camera when the target leaves a box around it. This is useful for platformers and shoulder cameras.

```swift
let deadZone = simd_float3(1.0, 0.5, 1.0)
cameraFollowDeadZone(
entityId: camera,
targetEntity: target,
offset: offset,
deadZoneExtents: deadZone,
smoothFactor: 6.0,
deltaTime: deltaTime
)
```

## Camera Path Following

The camera path system moves the active camera through a sequence of waypoints with smooth interpolation.

### Start a Path

```swift
let waypoints = [
CameraWaypoint(
position: simd_float3(0, 5, 10),
rotation: simd_quatf(angle: 0, axis: simd_float3(0, 1, 0)),
segmentDuration: 2.0
),
CameraWaypoint(
position: simd_float3(10, 5, 10),
rotation: simd_quatf(angle: Float.pi / 4, axis: simd_float3(0, 1, 0)),
segmentDuration: 2.0
)
]

startCameraPath(waypoints: waypoints, mode: .once)
```

You can also build waypoints that look at a target:

```swift
let waypoint = CameraWaypoint(
position: simd_float3(0, 5, 10),
lookAt: simd_float3(0, 0, 0),
up: simd_float3(0, 1, 0),
segmentDuration: 2.0
)
```

### Update Every Frame

Call `updateCameraPath(deltaTime:)` from your main update loop:

```swift
func update(deltaTime: Float) {
updateCameraPath(deltaTime: deltaTime)
}
```

### Looping and Completion

```swift
startCameraPath(waypoints: waypoints, mode: .loop)

let settings = CameraPathSettings(startImmediately: true) {
print("Camera path completed")
}
startCameraPath(waypoints: waypoints, mode: .once, settings: settings)
```

## Notes

- `startCameraPath` and `updateCameraPath` operate on `CameraSystem.shared.activeCamera`.
- `segmentDuration` is the time to move from the current waypoint to the next.
- For gameplay, always acquire the camera with `findGameCamera()` and set it active before path playback or follow logic.
118 changes: 118 additions & 0 deletions website/versioned_docs/version-0.8.0/01-Intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
slug: /intro
---

# Untold Engine Documentation

Welcome to the **Untold Engine documentation**.

These docs are the primary reference for working with the Untold Engine ecosystem — whether you are building a game, extending the engine, or contributing to the editor.

---

## What Is Untold Engine?

![untoldengine](images/Editor/EditorMainShot.png)

The Untold Engine strives to be a stable, performant, and developer-friendly 3D engine that empowers creativity, removes friction, and makes game development feel effortless for Apple developers

The Untold Engine is an open-source 3D game engine under active development, designed for macOS, iOS, xrOS platforms. Written in Swift and powered by Metal, its goal is to simplify game creation with a clean, intuitive API.

While the engine already supports many core systems like rendering, physics, and animation, there’s still much to build and improve.

---

## The Untold Engine Ecosystem

Untold Engine is delivered through three closely related products:

### Untold Engine Studio
A downloadable application that includes:
- The Untold Engine runtime
- The Untold Editor
- Built-in tools for scripting, assets, and scene editing

This is the recommended starting point for most users.

---

### Untold Engine
The core engine runtime.

This is intended for:
- Engine developers
- Contributors
- Advanced users who want to modify or extend engine systems

Installation is performed via the command line.

---

### Untold Editor
The editor application built on top of the engine runtime.

This is intended for:
- Contributors working on editor features
- Developers extending tools and workflows

The editor uses the same runtime as games, ensuring consistent behavior.

---

## Choose Your Path

These docs are organized around **how you intend to use the engine**.

### Game Development
For developers building games using Untold Engine.

You will learn:
- How to create scenes visually
- How to write game logic (Swift or USC scripts)
- How to work with assets and entities
- How to build and run your game

Untold Engine supports two approaches for writing gameplay code:
- **Swift in Xcode** (recommended) - Full engine API access
- **USC Scripts** (experimental) - Component-based scripting

Start here if your goal is to build a game.

---

### Engine Development
For developers who want to understand or extend the engine itself.

You will learn:
- The engine architecture
- ECS and system execution
- Rendering and simulation internals
- How to contribute new engine features

Start here if you want to work on the engine runtime.

---

### Editor Development
For contributors working on the Untold Editor.

You will learn:
- Editor architecture
- Views, tools, and interaction models
- How the editor coordinates with the engine
- How to extend or add editor functionality

Start here if you want to improve the editor.

---

## Getting Started

If you are unsure where to begin:

- New users: **Game Development → Overview**
- Scripting users: **USC → Introduction**
- Contributors: **Engine Development → Architecture**

Each section is designed to stand on its own.

Loading
Loading