- Home /
Not able to export to android due to joint collision?
I have a little cube that uses various springs and joints to simulate a jelly block. It builds and exports to PC however, when exporting to android, it will not allow it and gives the error
"BCE0019: 'otherCollider' is not a member of 'UnityEngine.Component'. "
The code that i have on the jelly block is this
var spring : float;
var damper : float;
var maxDistance : float;
var minDistance : float;
var vertexMass : float;
var bouncy : PhysicMaterial;
var xAngleClamp : float;
var yAngleClamp : float;
function Start() {
var hingeJoints = GetComponentsInChildren (SpringJoint);
for (var joint : SpringJoint in hingeJoints) {
//joint.anchor = joint.transform.localPosition;
}
}
function Update () {
var hingeJoints = GetComponentsInChildren (SpringJoint);
for (var joint : SpringJoint in hingeJoints) {
joint.spring = spring;
joint.damper = damper;
joint.maxDistance = maxDistance;
joint.minDistance = minDistance;
joint.connectedBody = rigidbody;
joint.transform.localRotation = Quaternion.identity;
joint.rigidbody.freezeRotation = true;
joint.rigidbody.mass = vertexMass;
}
var jointCollisionScripts = GetComponentsInChildren (JointCollision);
for (var jointCollisionScript in jointCollisionScripts) {
if (this.collider)
jointCollisionScript.otherCollider = this.collider;
}
}
The jointCollision procedure is then this
var otherCollider : Collider;
function Update () {
if (otherCollider)
Physics.IgnoreCollision(this.collider, otherCollider);
}
If anyone can help me with getting this to export to android i would be much appreciative of the help. If you need any other info dont hesitate to ask :) THANK YOU!
Comment