Grab API¶
Quick-reference for UMovaIxGrabComponent. For setup and tuning
narrative, see Grab, carry & throw.
Verbs¶
-
void UMovaIxGrabComponent::ToggleGrab()¶
Grabs the aimed primitive when hands are empty, else drops the held one.
-
bool UMovaIxGrabComponent::GrabAimed()¶
Grabs the grabbable primitive the view is aimed at, within ReachDistance.
- Returns:
True when something was grabbed.
-
void UMovaIxGrabComponent::ReleaseHeld()¶
Drops the held primitive where it is, with no impulse.
-
void UMovaIxGrabComponent::ThrowHeld(float StrengthScale = 1.0f)¶
Throws the held primitive along the view.
- Parameters:
StrengthScale -- Multiplier on ThrowImpulse. 1 is full strength.
Queries¶
-
UPrimitiveComponent *UMovaIxGrabComponent::GetHeldComponent() const¶
Primitive currently held, or null when hands are empty.
-
bool UMovaIxGrabComponent::IsGrabbable(UPrimitiveComponent *Prim) const¶
Whether a primitive may be grabbed: simulating, under the mass cap, and tagged when a tag is required.
A game needs to ask this before it offers a prompt, an outline or a "too big" message.
Pure: inspects the primitive and this Component's settings, and changes nothing.
-
bool UMovaIxGrabComponent::IsHolding() const¶
True while a primitive is held.
Events¶
OnGrabbed, OnReleased, OnThrown: FMovaIxGrabSignature, each passing the
affected UPrimitiveComponent*.
Tunables¶
Property |
Default |
Purpose |
|---|---|---|
|
|
required tag on the primitive/actor; |
|
400 cm |
trace range from the camera |
|
200 cm |
distance in front of the camera the held object floats |
|
15 |
snappiness of the chase to the hold point |
|
0 (no cap) |
heaviest primitive (kg) that may be grabbed |
|
60000 |
impulse magnitude along the view |
|
false |
keep the held object's rotation relative to the view |
|
|
trace channel for the aim trace |
Full class¶
Full member listing (fields, private members, replication details): Runtime Components.