My guesses on the grabbing system

Hey there, everyone! :smile:

So these are my takes on the questions about the grabbing system:

Use inheritance or component?
I would look for inheritance first. UE is an engine made by people really experienced
in making games, I guess they already have a grabbing system coded in the engine.
It seems the Physics Handle of an object is kind of set up for this job:
https://docs.unrealengine.com/en-US/BlueprintAPI/Physics/Components/PhysicsHandle/GrabComponentatLocation/index.html
https://docs.unrealengine.com/en-US/BlueprintAPI/Physics/Components/PhysicsHandle/index.html

How may we know what to grab?
The “grab ray” coming out of the player pawn in its looking direction seems a pretty
good way. We make this ray with a sensible length (say 50cm), and if it touches the
object, it becomes “grabbed”. I would also like to make this system work when a key is
pressed by the player (say E or LMB).
It seems there the cursor is also set up to do several things, including drag objects around:
https://docs.unrealengine.com/en-US/Resources/ContentExamples/MouseInterface/SettingsAndCursors/index.html

What game object would we be working with?
I guess we will be setting components of the draggable objects and perhaps programming
behaviors in Blueprint.

Privacy & Terms