A Cube That I Pick Up Acts Kinematic, Although it Isn't.

I have a script set up that allows the player to click once to pick up an object that has an empty “marker” script attached. It then floats in front of you, and if you move, it follows you. You can click again to drop it. But the problem is that when I move the cube near a wall or the floor, it goes right through, as though it is Kinematic, although I have checked and double-checked that it isn’t. I only turn off gravity for the object. Another really weird thing is that when I commented out the lines turning off gravity, it still floated in front of me when I tried to pick it up. This may turn out to be a really simple fix, but I can’t figure it out.

Thanks in advance.
`

Best guess is it’s “transform.forward” on row 33 of your code, from what i remember that would sometimes cause it to bust thru any collider.

Try using Rigidbody.Addforce maybe.

Wow, it was a really stupid mistake: I had the smooth variable on the transform line set to 500 which completely made everything not work :D. Figured it out now, set it to 7… Thank you so much for your suggestions though!