Skip to main content
added 8 characters in body
Source Link
2600th
  • 1k
  • 1
  • 12
  • 25

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}

The details of the object I'm instantiating. https://i.sstatic.net/dKhgm.png

The script is attached to an empty GameObject and Instantiated GameObject is stored in a array of GameObjects:

 Block[0] = Instantiate(boxPiece) as GameObject;

where Block[ ] is a array of GameObject and boxPiece is the Object I want to instantiate. And II'm checking for collisions in this very same script.

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}

The details of the object I'm instantiating. https://i.sstatic.net/dKhgm.png

The script is attached to an empty GameObject and is stored in a array:

 Block[0] = Instantiate(boxPiece) as GameObject;

where Block[ ] is a array of GameObject and boxPiece is the Object I want to instantiate. And I checking for collisions in this same script.

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}

The details of the object I'm instantiating. https://i.sstatic.net/dKhgm.png

The script is attached to an empty GameObject and Instantiated GameObject is stored in a array of GameObjects:

 Block[0] = Instantiate(boxPiece) as GameObject;

where boxPiece is the Object I want to instantiate. And I'm checking for collisions in this very same script.

Explained
Source Link
2600th
  • 1k
  • 1
  • 12
  • 25

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}

The details of the object I'm instantiating. https://i.sstatic.net/dKhgm.png

The script is attached to an empty GameObject and is stored in a array:

 Block[0] = Instantiate(boxPiece) as GameObject;

where Block[ ] is a array of GameObject and boxPiece is the Object I want to instantiate. And I checking for collisions in this same script.

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}

The details of the object I'm instantiating. https://i.sstatic.net/dKhgm.png

The script is attached to an empty GameObject and is stored in a array:

 Block[0] = Instantiate(boxPiece) as GameObject;

where Block[ ] is a array of GameObject and boxPiece is the Object I want to instantiate. And I checking for collisions in this same script.

Code formatted
Source Link
doppelgreener
  • 7.3k
  • 7
  • 43
  • 69

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide. But, but I'm not getting anything inside 'void OnCollisionEnter(Collision collision){}':

void OnCollisionEnter(Collision collision){}

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide. But I'm not getting anything inside 'void OnCollisionEnter(Collision collision){}'

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting anything inside:

void OnCollisionEnter(Collision collision){}
deleted 10 characters in body
Source Link
House
  • 73.3k
  • 17
  • 185
  • 273
Loading
Source Link
2600th
  • 1k
  • 1
  • 12
  • 25
Loading