How to get correct collision when picking up objects and moving them at high speeds near walls?

I made a script that I attached to the First person controller that allows me to pick up objects, rotate and thrown them similar to amnesia the dark decent.Collisions work to an extent but the problem is, when I pick up and swing an object fast enough near a wall it will go straight through.

Here’s how I’m moving the object:

ray = Camera.main.ScreenPointToRay(new Vector3(Screen.width / 2, Screen.height / 2, 0));
newPos = ray.GetPoint(objectToPlayerDistance);
Vector3 velocityDirection = (newPos - pickedObjectTransform.position) / Time.deltaTime;
    			
pickedObjectrigBody.velocity = velocityDirection;

The only other thing I’ve done to the rigid body is make the freezeRotation boolean true.
I have noticed that the velocity stays at (0, 0, 0) when I’m holding an object. Could that be a contributing factor? I’m at a loss and have spent a good while trying to figure this out.
Thanks in advance.

I think you are looking for this (http://wiki.unity3d.com/index.php?title=DontGoThroughThings)
:slight_smile: