how to make grabbed phys object not clip through a wall?

I think you’ll get best results by setting up physics-based grabbing and letting the physics engine handle collisions.

Here is an example physics-based spring arm component, which you can attach to the camera component in Character BP. Then you can virtually attach any physics object to it.


Custom scene component BP - the component provides attachment and detachment functions, it backups and modifies a few physics properties to feel better while carrying around (gravity, damping), and applies physics on tick to maintain object at a target distance.


Character setup - I added an overlapper capsule to detect grabbable objects in range, and a physics spring arm (the new component) with some sound defaut values :


Character BP - (overly) simplistic setup to grab object in range when pressing E :


7 Likes