Prior to this tutorial I have spent at least a year playing with Blueprints.
Firstly, I would make a parent actor called “Interactive object” (Using this in case, i will need to add more parent variables). It will have a boolean called “bCanBePickedUp”.
Secondly, I would make an editable pawn, on the view port I will add a trigger volume in front off the player. When the trigger volumes overlaps actors off the specific class then draw a sphere trace:
Start: GetActorLocation()
End: GetCameraRotation() -> GetForwardVector() * (Multiply by, not pointer) float PushMagnitude (How far you want the trace to go). Then add that to GetActorLocation().
Then check if the hit result actor is that off InteractiveActor. If true, check if it can be picked up. If true, set that actors location to the:
GetCameraRotation() -> GetForwardVector() * (Multiply by, not pointer) float HoldForwardMagnitude. Then add GetActorLocation().
This would be done off button input. The sphere tracer will have to rely on a constant radius and a few other variables (Vectors, bools, FHitResult(https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/FHitResult/index.html), ECollisionChannel).
I’m open to any feedback, I took an ample break from this tutorial and have been avoiding the forms but decided to follow through for once.