Before updating to Windows 10 you may need to return your Pro license. More information here

onCollisionEnter doesn't work without RIgidbody?

Hi, I am trying to check the collision between two colliders and OnCollisionEnter() doesn't work unless one of the object is RigidBody. I can't use Rigid Body for all the objects as it's a way expensive....

Also tried with trigger and it doesn't work without Rigidbody too.... Anyone helps me..

more ▼

asked Nov 07, 2010 at 06:03 AM

avatar image

Thet Naing Swe
881 184 162 149

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Correct. As shown in the docs, in order for anything to generate OnCollision events, one of the two objects involved must be a rigidbody. There's no way around that. You don't put a rigidbody on everything, just the objects that move.

more ▼

answered Nov 07, 2010 at 06:17 AM

avatar image

121k 79 363 774

So.. How about doing something like strategy games? there will be hundreds of moving characters and putting rigidbody on each character will be alot expensive.

Nov 07, 2010 at 07:22 AM Thet Naing Swe

Strategy games are typically done using a grid, so you can check the grid position of each character in an array instead of using physics.

Nov 07, 2010 at 01:20 PM Eric5h5

Thanks.. I will try to calculate using grid...

Nov 08, 2010 at 06:16 AM Thet Naing Swe
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Nov 07, 2010 at 06:03 AM

Seen: 5513 times

Last Updated: Nov 07, 2010 at 06:03 AM