Raycast on a Deactivated Object?

DestroyerOfCities
Posts: 20
Joined: Fri Dec 10, 2010 3:39 am

Raycast on a Deactivated Object?

Post by DestroyerOfCities »

So now I'm trying to implement a simple gun. I do a raycast as per the wiki to figure out which object I've hit, then I cast the collision shape to a rigid body and apply an impulse. The way my little demo is set up is that a stack of boxes fall in place when the program starts. So while these boxes are active, I can shoot them just fine. But when they settle and deactivate, I can no longer shoot them! It's like the raycast ignores deactivated objects...?

Is there a way around that?
DestroyerOfCities
Posts: 20
Joined: Fri Dec 10, 2010 3:39 am

Re: Raycast on a Deactivated Object?

Post by DestroyerOfCities »

Oh duh it still registers the collision, the impulse just doesn't have any effect on an inactive object. So I have to manually activate it.