IRaptorPlayerProfile
Sets the body, eye height and radius of the player the Player Reference shows.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | interface | preview, since 0.1.0 |
Register one from an [InitializeOnLoad] class with RaptorPlayerProfiles.Register(new MyPlayer());. With none registered, RAPTOR uses the humanoid prefab set in Project Settings → RAPTOR → Player, or a built-in mannequin.
public interface IRaptorPlayerProfileProperties
BodyRadius
float BodyRadius { get; }The player's capsule radius, in metres.
EyeHeight
float EyeHeight { get; }The player's camera height above the feet, in metres.
FallbackIdleClip
AnimationClip FallbackIdleClip { get; }The idle clip to use when the body's Animator controller has no default-state clip. If null, the bind pose is used.
Id
string Id { get; }A stable id, trimmed and not blank. The first profile registered with an id wins.
Prefab
GameObject Prefab { get; }The prefab whose humanoid body the Player Reference shows, baked in its idle pose. If null, the built-in mannequin is shown.
Methods
SeatHead
Pose SeatHead(Pose rest, Pose clip)Returns the head bone's local pose in the baked idle, from its rest (bind) pose and its pose in the idle clip. Return clip to keep the clip's head. If your game drives the head itself, return rest.
| Parameter | Type | Description |
|---|---|---|
rest | Pose | The bone's rest pose. |
clip | Pose | The bone's pose in the idle clip. |
Returns: The head pose to bake.
Related types
- RaptorPlayerProfiles: The player profile registry.