Pickup / grab and move a wandering npc

Hi there. I set up a grab mechanic using a line trace to pickup and move physics objects using physics handle.

Im wondering how to grab and move an ai npc.
I basically want to fire the linetrace, when it hits an npc thats wandering around, it picks it up, stops it from moving and when i put it down again it resumes its wandering.

Player controller logic

init

pickup

drop logic

basic ai

bttask random move to

Player pawn offset point

Video

Project 5.4
pickai.zip (97.5 KB)

Edit: To make the functions more universal then you could replace the cast to the BP_AI with a cast to the basic Character class and then filter out by actor tags who you want to be able to pickup.

2 Likes

Thats amazing thankyou very much!!!

1 Like