How do I find actors in an area on a poly-precise basis?

Posted by Almo on Game Development See other posts from Game Development or by Almo
Published on 2012-12-12T17:27:45Z Indexed on 2012/12/12 23:22 UTC
Read the original article Hit count: 203

Filed under:
|

Ok, I've been asking various questions and getting some good answers, but I think I need to rethink my method, so I'll describe the problem.

I have a player who has a big blue box in front of him. This box shows which KActors will be pushed when he pulls the trigger:

enter image description here

Currently, the blue box spawns a descendant of Actor which checks collision to see which KActors are touching it:

foreach Owner.TouchingActors(class'DynamicSMActor', DynamicActorItt)
{
      // do stuff
}

The problem is, if you check for touching between Actors and KActors, it looks like it does a plain axis-aligned bounding-box collision. The power will push the box on the lower right, when it's clear it's not touching the blue box.

How should I do this properly? I just need a way to find out which KActors are touching that area, on a poly-by-poly level. These collisions are only done with rectangular boxes and simple sphere collision; we are aware of the potential for performance issues with complex objects and poly-collision.

I've tried making the collision checker a KActor, but it doesn't report any TouchingActors.

This issue is causing us trouble in a lot of other places as well. So solving this problem is a core issue in our game.

© Game Development or respective owner

Related posts about collision-detection

Related posts about udk