ข้ามไปยังเนื้อหา

Blueprint API

เนื้อหานี้ยังไม่มีในภาษาของคุณ

Function Net What it does
Set Turn In Place Enabled (bool) Server Enables or disables the system. Replicates.
Is Turn In Place Enabled any Reads the switch.
Set Aim Limit (Mode, Max Aim Yaw Offset = 90) Owning client and server Changes the aim limit at runtime (first/third person switch, aiming).
Set Footsteps Enabled / Are Footsteps Enabled local Cosmetic toggle for footstep notifies and On Turn Footstep.
Get Turn State any Disabled, Idle, Turning, Pivoting, Moving.
Is Turning any True while turning or pivoting.
Get Aim Yaw Offset any Signed degrees from facing to aim. Positive = aim is to the right.
Get Anim Data any Snapshot struct (below).
Event When
On Turn State Changed (New State, Previous State) On every machine when the state changes. Use for sound, camera, UI.
On Turn Footstep (Footstep) A procedural foot lifts off or lands. Not on dedicated servers.

Footstep struct: Leg Index, Foot Bone, Location, Is Plant (true = landing), Has Ground Hit, Ground Hit (with physical material when Trace Footstep Ground is on).

Event Graph: On Turn Footstep branching on Is Plant and playing a sound by surface.

Field Meaning
State Current turn state.
Aim Yaw World aim yaw in degrees (smoothed on simulated proxies).
Has Aim False when no controller/aim is available.
Aim Yaw Offset Signed degrees from facing to aim.

The component refreshes its Anim Data property every tick. You only need it if you build your own animation logic (for example blending a turn animation yourself). The AnimGraph node does not need it.

Library: Vertex Turn In Place Library.

Function Returns
Get Turn In Place Component (Actor) The component (game thread only; cache it in Initialize Animation).
Is Turning In Place (Anim Data) Rotating toward aim, not pivoting.
Is Pivoting (Anim Data) Pivoting toward movement direction.
Is Standing (Anim Data) Idle or turning in place.
Get Turn Direction (Anim Data) -1 left, 1 right, 0 not turning.

Typical use: cache the component in Event Blueprint Initialize Animation, read Anim Data with Property Access inside Blueprint Thread Safe Update Animation, and feed the helpers.

Animation Blueprint: cached component in Initialize Animation and thread-safe update reading Anim Data.