|
Is it possible to use OnCollisionEnter or detect collision otherwise without having one object affect the position of the other? i.e., bullet A hits Object B, but Object B does not move, bullet A goes "right through" OnTriggerEnter with isTrigger checkboxed for the bullet and rigidbody set for both objects:
(comments are locked)
|
|
you can set for the GameObjects that are Colliding in the Collider component settings in the inspector "is Trigger = true" and call OnTriggerEnter instead of OnCollisionEnter ... so the colliders will "fly" or go through each other. so this way Bullet A hits Object B, and Object B does not Move, Bullet A goes through :) also, try to debug yor collition/trigger check the size of the collider ,, is it covering the gameobject? maybe a collider size problem ? try to debug the collision. replace your function or add the debug line : void OnTriggerEnter(Collider col){ Debug.Log("Collision True"); t.text = col.gameObject.name; }
Apr 06 '12 at 10:12 PM
Graphicated
(comments are locked)
|
