- Home /
Question by
diamantnir · Apr 08, 2015 at 09:07 AM ·
unity 5javascriptcollisionphysics
Collision work on pc emulator but not on android device
I have 2 objects with colliders. the sphere object("ball") should collide with the mesh("goal"):
sphere collider
mesh collider
they both non-kimetric.
i use the next code:
function OnCollisionEnter(theCollision : Collision){
if(theCollision.gameObject.name == "goal" )
{
(tm.GetComponent(TextMesh) as TextMesh).text = "enter1";
forceAmount.z=-1000;
rb.AddForce(forceAmount);
}
}
the code works perfect in the unity emulator but when i build it to apk file and install on my android tablet its not works.
can anyone help me with this?
Comment
Your answer
Follow this Question
Related Questions
Rigidbody w/ sphere collider falls or pushes through mesh collider. 0 Answers
Can you help me about collision please ? 3 Answers
2D platformer. Let player slide under object. 1 Answer
Non-convex MeshCollider with non-kinematic Rigidbody? 2 Answers
Looking for some advice for a Horse with Rigidbody 0 Answers