Quantcast
Channel: Latest Questions by UnityJosh
Viewing all articles
Browse latest Browse all 6

AddComponent HingeJoint2D not working unity 5

$
0
0
Running in unity 5 this codes not working, any ideas? var legEndPos:Vector2; var legRot = legLeft.transform.rotation.eulerAngles.z; legEndPos.x = legLeft.transform.position.x + (Mathf.Cos(((legRot-90))*(Mathf.PI/180.0))*(0.12)); legEndPos.y = legLeft.transform.position.y + (Mathf.Sin(((legRot-90))*(Mathf.PI/180.0))*(0.12)); legLeftHinge = legLeft.AddComponent(HingeJoint2D); legLeftHinge.anchor.x = 0; legLeftHinge.anchor.y = -0.12; legLeftHinge.connectedAnchor = legEndPos;

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>