# dolphinPlayerBody

A bounded kinematic player body with walking, gravity, sliding, jump edges, and an eye rig. Static AABBs provide collision; arbitrary mesh collision is outside this prototype.

Last updated: 2026-09-09

Package: dolphin.player3d | Status: source-declared

Tags: class, cpu, dolphin, dolphin.player3d, method, player3d, source-example

Use dolphin.player3d in Yeho source.

```yh
external class dolphinPlayerBody
```

- list of dolphinAabb3 solids: Stores solids as list of dolphinAabb3.
- float x: Stores x as float.
- float radius: Stores radius as float.
- bool grounded: Stores grounded as bool.
- dolphinAffine3 head: Stores head as dolphinAffine3.
- dolphinPlayerBody(): Dolphin player body.
- SetSolids(list of dolphinAabb3 original boxes) returns bool: Set solids.
- PositionClear(float x,float y,float z) returns bool: Position clear.
- Spawn(Vector3 feet,float yaw) returns bool: Spawn.
- Look(float dx,float dy): Look.
- SweepAxis(int axis,float amount) returns float: Sweep axis.
- Step(float forward,float right,bool jump,bool sprint,float seconds) returns bool: Step.
- SetHead(dolphinAffine3 pose) returns bool: Set head.
- EyePose(float lateral) returns dolphinAffine3: Eye pose.

## Use dolphinPlayerBody

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using dolphin.player3d

// Use dolphin.player3d in Yeho source.
dolphinPlayerBody sample = dolphinPlayerBody()
Console.Log(Text.From(sample.x))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.SetSolids

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Set solids.
dolphinPlayerBody instance = dolphinPlayerBody()
list of dolphinAabb3 argument_boxes = []
bool result = instance.SetSolids(argument_boxes)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-SetSolids-6 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.PositionClear

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Position clear.
dolphinPlayerBody instance = dolphinPlayerBody()
float argument_x = 1.0
float argument_y = 1.0
float argument_z = 1.0
bool result = instance.PositionClear(argument_x, argument_y, argument_z)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-PositionClear-7 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.Spawn

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Spawn.
dolphinPlayerBody instance = dolphinPlayerBody()
Vector3 argument_feet = Vector3(1.0, 1.0, 1.0)
float argument_yaw = 1.0
bool result = instance.Spawn(argument_feet, argument_yaw)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-Spawn-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.Look

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Look.
dolphinPlayerBody instance = dolphinPlayerBody()
float argument_dx = 1.0
float argument_dy = 1.0
instance.Look(argument_dx, argument_dy)
Console.Log("Look completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-Look-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.SweepAxis

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Sweep axis.
dolphinPlayerBody instance = dolphinPlayerBody()
int argument_axis = 1
float argument_amount = 1.0
float result = instance.SweepAxis(argument_axis, argument_amount)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-SweepAxis-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.Step

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Step.
dolphinPlayerBody instance = dolphinPlayerBody()
float argument_forward = 1.0
float argument_right = 1.0
bool argument_jump = true
bool argument_sprint = true
float argument_seconds = 1.0
bool result = instance.Step(argument_forward, argument_right, argument_jump, argument_sprint, argument_seconds)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-Step-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.SetHead

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Set head.
dolphinPlayerBody instance = dolphinPlayerBody()
dolphinAffine3 argument_pose = dolphinAffine3()
bool result = instance.SetHead(argument_pose)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-SetHead-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinPlayerBody.EyePose

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.player3d

// Eye pose.
dolphinPlayerBody instance = dolphinPlayerBody()
float argument_lateral = 1.0
dolphinAffine3 result = instance.EyePose(argument_lateral)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_player3d__dolphinplayerbody"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.player3d"
version = "0.1.0"
path = "../../../dolphin/packages/player3d"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.player3d--dolphinPlayerBody/method-EyePose-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: dolphin/packages/player3d/src/player_body.yh

AI training permission: https://demonhunterlabs.com/ai-use
