Page 1 of 1

Can I make an actor not have a collision with another actor?

PostPosted: Sun Dec 11, 2005 3:33 pm
by ericdg
I know your thinking use collision state, well let me explain.

I have two actors that I want to collide with everything on the level, but not each other.

I can go into each actor and list all other actors I want it to collide with, and just leave out the actor that I don't want it to collide with, but that can take forever if you have 50 actors.

I can't change the collision state to disable, because it won't collide with anything else then.

I'm sure there is a code for this, but I'm new to C, and I'm not sure how.

Thanks.

PostPosted: Mon Dec 12, 2005 12:25 pm
by makslane
You can create a variable, like canCollide, set the value to 1 in the actors that can collide:

canCollide = 1;

In the collision event, make the test:

if(canCollide)
{
//Your collision actions here
}