- Home /
Question by
CB-TV · Feb 07, 2014 at 07:36 PM ·
c#rigidbodyvariableconstraints
UnityEngine.Rigidbody does not contain a definition for `contraints'
I declared a variable improperly with:
public Rigidbody heldObject;
Then, down the line, where the error is, I have:
if(heldObject.contraints != RigidbodyConstraints.FreezeRotation)
heldObject.contraints = RigidbodyConstraints.FreezeRotation;
It gives me this error:
...error CS1061: Type UnityEngine.Rigidbody' does not contain a definition for
contraints' and no extension method contraints' of type
UnityEngine.Rigidbody' could be found (are you missing a using directive or an assembly reference?)
I know I am doing something wrong when declaring the variable but what?
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to solve problem involving RigidBody.Constrains 1 Answer
cannot have all constraints on in rigidbody? 1 Answer
Variable References in C# from JS 1 Answer