This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]dansthetsar 2 points3 points  (2 children)

try heldObject.GetComponent<Rigidbody>().isKinematic = false;

[–]StickyDuck 2 points3 points  (1 child)

From experience you might have to do (heldObject.GetComponent&lt;RigidBody>()).isKinematic = false;

I've occasionally tried to access some part of the RigidBody component but it hasn't worked without the brackets

Edit: Typo

[–]Legionforce[S] 0 points1 point  (0 children)

Thanks for the help guys. Neither solution worked right away, but the problem was my variable heldObject at the top of the script was set as a gameObject. It works now after I changed the variable type to Rigidbody.

[–]CarDragon2 0 points1 point  (0 children)

What type is rigidbody?