No announcement yet.

Preferential Collision

  • Filter
  • Time
  • Show
Clear All
new posts

    Preferential Collision

    Hi folks!

    I'm trying to determine how to get my KActors to not have collision with a certain class of pawn, while keeping normal collision with everything else.

    I have a wall comprised of KActor bricks. I would like the AI controlled pawns to be able to walk through this wall, while keeping all other normal collision (both for the AI controlled pawns as well as for the player, who should not be able to walk through the wall).

    I'm having difficulty even framing this question correctly, which is probably why I'm having difficulty finding a solution through searching. This may be super simple, and if it is I apologize, but after 2 hours of searching I figure it's time to just come out and ask.


    You need to play with the RBChannel and RBCollideWithChannels settings to filter the player pawn out of collision with the bricks.

    One solution would be to assign bricks to their own channel, such as RBCC_Untitled1, and set the Untitled1 channel of the player pawn's RBCollideWithChannels array. The pawn would then perform collision checks against the 'untitled1' channel, while regular pawns ignore it.

    A reverse method is to assign players and bots to two separate channels, set the bricks to RBCC_Nothing, and also set the bricks' respective RBCollideWithChannel to collide with the player pawn. This method allows bricks to control who they collide with, but it does meddle with the standard of assigning pawns to RBCC_Pawn.

    There're plenty of options and flexibility in the system.