Grab, carry & throw¶
UMovaIxGrabComponent is the "hands" half of MovaInteract: physics grab,
carry, and throw for a pawn. Add it, bind a few inputs, and the player can
pick up any simulating physics primitive under the crosshair, carry it
floating in front of the camera, and hurl it.
Save the real screenshot as: shot-grab-carry-throw.png
Add it to a pawn¶
Select your pawn Blueprint → Add Component → Mova Interact Grab.
Bind input actions to the verbs you want:
Function |
Does |
|---|---|
|
Grab the aimed primitive when hands are empty, else drop the held one. The one binding most games need. |
|
Grab only: returns |
|
Drop the held primitive where it is, no impulse. |
|
Throw along the view; |
That's the whole setup, no physics handle to configure by hand, the
component spawns and owns a UPhysicsHandleComponent in BeginPlay.
What counts as grabbable: IsGrabbable¶
A primitive is grabbable when it:
Is simulating physics (
bSimulatePhysics = true), andIs under
MaxGrabMass(kg;0= no cap), andCarries
GrabTagon the primitive or its actor.GrabTagdefaults to the canonical#Grabcomponent tag: set it in the constructor fromMovaIx::Names::Grabso the literal lives in one place. SetGrabTag = Noneto allow grabbing any simulating primitive regardless of tag.
IsGrabbable(Prim) is BlueprintPure and public: a game
needs to ask before offering a prompt, an outline, or a "too
big" message, and it's the exact filter the server re-runs on every
grab request, so you can test it directly.
Tuning the feel¶
Property |
Controls |
|---|---|
|
How far the grab trace reaches from the camera (cm): how far away you can start a grab. |
|
Where the held object floats in front of the camera (cm) once grabbed. |
|
How snappily the held object chases the hold point as you move ( |
|
Impulse magnitude applied along the view on |
|
On: the object's rotation follows your view while held (good for tools, weapons). Off (default): it keeps whatever rotation it was grabbed at (good for crates, debris, no snapping to face you). |
|
Trace channel used to find the grabbable under the crosshair (default |
A heavier-feeling game wants a lower HoldInterpSpeed and a shorter
ReachDistance; an arcade-y one wants both cranked up.
Composing with the tag grammar¶
OnGrabbed(Component) / OnReleased(Component) / OnThrown(Component)
hand you the primitive on pickup and drop. Use them to run ordinary
interaction tags (glow while carried, a thunk on landing) bridging the
grab system into the same Tag Grammar Reference everything else
uses:
void AMyPawn::HandleGrabbed(UPrimitiveComponent* Comp)
{
if (UMovaIxComponent* IC = Comp->GetOwner()->FindComponentByClass<UMovaIxComponent>())
{
IC->ExecuteTags({ TEXT("!Highlight #Self") });
}
}
Bind these three events once on BeginPlay and every grabbable object in
the level gets the same pickup/drop feedback without per-object wiring.
See also¶
Tag Grammar Reference: the syntax
OnGrabbed/OnReleasedhandlers run.Multiplayer: the server-authoritative pattern this component shares with the rest of MovaInteract.
Debug overlay & troubleshooting:
mova.ix.Debugshows detection state alongside grab reach, useful when tuningReachDistance.