Hi, for my game I need to change the spring of some hinge joints and also the motors.
But I get this errors:
Cannot modify a value type return value of UnityEngine.HingeJoint.motor'. Consider storing the value in a temporary variable. Cannot modify a value type return value of UnityEngine.HingeJoint.spring’. Consider storing the value in a temporary variable
What’s even worse is that unity documentation doesn’t help at all, since it has the same mistake in there: Unity - Scripting API: HingeJoint.spring
So, how can I save the spring of an hinge joint inside a variable?
Thanks in advance
yeah, by the time I already made it :) I'm having some other issues now so I don't know if it's working correctly though, also, I don't know if I'll really have to do that line: hingeJoint.spring = mySpring since the spring will be assigned from the inspector it'll probably change it directly, I don't know tho.
– MadJohnyYeah, it will work, anyway I'll use javascript for this project, or atleast this script, it's so much more complicated to make this script in c#.
– MadJohny