reckfellENGINE

Player: shape, layers and input

A CharacterBody3D prefab, separate Visual, hit area and exact input action names.

On this page

Prefab

Use File → Create Prefab… with a CharacterBody3D root, name it Player and save Prefabs/Player.rprefab:

Text
Player (CharacterBody3D, SquashPlayer.cs)
├── CollisionShape3D
├── Visual (Entity3D, LandingPulse.cs)
│   └── MeshInstance3D
└── MobDetector (Area3D)
    └── CollisionShape3D

The main CollisionShape3D uses a CapsuleShape3D, Radius 0.35, Height 1.8. Give Visual/MeshInstance3D a matching CapsuleMesh and blue StandardMaterial3D. Keep Visual at local position 0 and scale 1. Attach the animation script to Visual, not the body.

Set MobDetector Position to (0, -0.1, 0), with Monitoring on and a child BoxShape3D of size (0.8, 1.6, 0.8). This gameplay detector is slightly wider than the physics capsule and detects close side contact on the floor.

Layers and masks

ObjectEnabled layer bitsEnabled mask bitsNumeric values
Floor1None1 / 0
Player21 and 32 / 5
Hazard314 / 1
MobDetectorNone30 / 4

An inspector layer-button number differs from its numeric bitmask: layer 3 is numeric 4. The player collides with floor and hazards; the area detects only hazards. Hazards do not block one another in this example.

Input Map

Add move_left — A / Left, move_right — D / Right, move_forward — W / Up, move_back — S / Down and jump — Space. Use physical key positions for letters.

Place the player instance in Arena.rscene at (0, 0.9, 0), resting the capsule bottom on the floor. Player.rprefab alone has no floor, camera or UI; test this 3D prefab in the level. See the complete controller.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.