I’m building a multiplayer racing game in which players can respawn at checkpoints spaced along the track. In order to ensure collisions don’t break the game, I am trying to make it work so that recently-respawned cars cannot collide with other vehicles until later. The logic for this is already in place.
The difficulty is making the collisions actually work as intended. I am using two collision channels. The first is ‘Vehicle’ which exists by default and the second is ‘RespawningVehicle’ which I added. Right now, collisions still happen even though, as far as I can tell, they should not. They are different though, in that the normal vehicle may move as normal and the respawning vehicle pops on top of it. It seems as though the first car is ignoring the respawning car, but the respawning car is not ignoring the other.
Given this, I made each car print out its collision channels at the moment of the “incident” on both the server and the client. I was given the following data (edited for readability).
Server: Vehicle1 Current type - RespawningVehicle Vehicle Response - Ignore | RespawningVehicle Response - Ignore Server: Vehicle2 Current type - Vehicle Vehicle Response - Block | RespawningVehicle Response - Ignore Client 1: Vehicle1 Current type - RespawningVehicle Vehicle Response - Ignore | RespawningVehicle Response - Ignore Client 1: Vehicle2 Current type - Vehicle Vehicle Response - Block | RespawningVehicle Response - Ignore
This is exactly as I told it to be in the blueprint script, as you can see here:
I should also add that the mesh mentioned here is the only component with any collisions. I can tell it to ignore other vehicles entirely by default and it will. It is only when trying to expand the logic as described that weird issues begin to surface.
Logically, a vehicle should ignore any respawning vehicle and a respawning vehicle should ignore any other vehicle at all, so that only combination of vehicles that can collide are two that are not respawning. Therefore these two vehicles should ignore each other, but they do not. As a brief aside, I have also tried using the Ignore Actor When Moving node to achieve the same result, but that only works for actors that aren’t simulating physics, which this actor is.
I would greatly appreciate some input on what could be causing this issue. Many thanks.