I have a little problem with my GravityWalker, here’s an example:
I have my walker’s floor mask at 0x00F00000 and my ground has the mask 0x00100000 and I have this item with the mask 0x00100000 and I stand up on it where it’s supposed to just detect collision. I tried setting the from and into collide masks on the item, but I still stand up on it. I have a hunch that the from and into collide masks aren’t what matches against the floor bitmask, what does?
No, I’m stepping up on top of my laser beam, really the whole thing is supposed to lose health if the laser beam hits you.
Ahh! Thanks! How do I change the mask so I don’t stand on top of it and instead get hit by it?
The GravityWalker has several nested CollisionSolid objects within it, each of which serves a slightly different purpose. The ray created by setupRay() is used to detect collisions with the floor so that you stand up on things. You probably want to set the collide mask on this ray to something that doesn’t intersect with your laser beam’s collide mask.
For detecting the event so that you can react to the laser beam and be killed, you probably want to use the event sphere, created by setupEventSphere(). Put a different collide mask on this object, one that does intersect with your laser beam’s collide mask.