- Home /
Android collision issues
I am currently having an issue where a 2d trigger collision box is working fine on PC but not on android. Here is the strange part it seems to be that it only breaks when i am instantiating projectiles from a particular ability that fans them out. However even if I modify this ability to only shoot one of the object its still fails collision on android.
These prefabs handle the collision with their own script and that works when they are shot by an archer or something. However if they are fired by this script they fail to collide.
The issue has to be in this braket of code any Ideas?
void makeRock( Vector3 targ){
GameObject g1 = Instantiate (projectile,owner.transform.position,owner.transform.rotation) as GameObject;
g1.transform.LookAt (targ);
g1.transform.localScale = new Vector2 (1, 1);
projectile projScript = g1.GetComponent<projectile> ();
projScript.vecTarget = targ;
projScript.isEnem = ownerCombat.isEnemy;
projScript.ownerCombatScript = ownerCombat;
if (Random.Range (0, 100) <= ownerCombat.critChance) {
projScript.dmg = ownerCombat.fullRangedCrit + ownerCombat.dmgBuff + ownerCombat.critDamageBuff;
} else {
projScript.dmg = ownerCombat.rangDmg + ownerCombat.dmgBuff;
}
projScript.accuracy = ownerCombat.accuracy;
}
Your answer
Follow this Question
Related Questions
My Unity android game cant run on my android 1 Answer
Normal map is not working with Unity 5 when Low-level Native Plugin Interface is used 0 Answers
Problem with obb 0 Answers
Collision Not Working 1 Answer
Makign an object collide continously 1 Answer