How can i pass Rigidbody through anoher rigidbaody??

hey frends,
i have randomly generating and colliding spheres.
which are bouncing from boundary of plane.
i want these spheres to go through each other without colliding.
how can i achieve that??
thanx in advance

Look up Physics.IgnoreCollision()

hey it worked…
but its giving error on console:

Scene::setShapePairFlags: The two shape references must not reference the same shape.
UnityEngine.Physics:IgnoreCollision(Collider, Collider, Boolean)
UnityEngine.Physics:IgnoreCollision(Collider, Collider, Boolean)
UnityEngine.Physics:IgnoreCollision(Collider, Collider) (at C:\builds\unity-trunk\unity\Runtime\Export\Generated\NewDynamics.cs:198)
IgnorCollision:Start() (at Assets\Script\IgnorCollision.js:9)

[\unity\stuff\external-source\physx\novodex\SDKs\Physics\src\NpScene.cpp line 1250]

any one???plzz

You are probably calling Phyiscs.IgnoreCollision on a collider with itself. Try calling it only on different colliders.

hehe yup dat ws the problem…
:sweat_smile:

This should fix your problem

if (ball.transform.collider != collider)
{
Physics.IgnoreCollision(ball.transform.collider, collider);
}