Hello great sages of Unreal. I’m having a weird one today and I’m hoping your collective wisdom can help.
So I am working on a little indie game that I’m intentionally making some weird design choices to stretch my unreal understanding, I COULD use the built in channels for a bit of this, but the point is that I want to learn to get the custom stuff working. I’m doing a mix of c++ and BP, but trying to put more in c++. I think I would need a little bit of custom channel work to get it behaving the way I want anyhow, but here’s the situation.
So my game is basically pong with weapons, the individual pong paddle is made up of blocks that can individually have their collisions and visibility turned off, so you can blast a hole in the other player’s paddle. The paddle actor creates 288 PaddleBlock Actors at beginplay and they attached to the root component of the paddle into a wall of blocks forming the paddle. I want the paddle to have the ability to be overlapped by the goal volume (You regenerate your broken blocks inside your own goal), but the paddle itself shouldn’t be the object colliding with the ball or the weapon projectiles, because those should hit the PaddleBlock actors attached to the paddle instead.
Here’s the Custom object Channels I’ve set up.
So yay! channels and object types exist for collision now. I set up a bunch of presets for these object types too.
So, for example the ball should collide with everything, except the CenterNet, and the GoalTrigger, which it should fire overlap events when passing through or into. (every pass of the center net increases the ball max speed slightly, and if it makes it to the goal volume, you score!)
Here’s the ball preset.
Here’s the Paddle Outer shell preset
And the Paddle Blocks Preset
I’m also making sure that I do CollisionBox->SetNotifyRigidBodyCollision(true); on all my boxes and the sphere for the ball. I do not do this for the paddle outer shell because it only needs to do overlap events. I have set the meshes for the ball and blocks to have no collision, I have included box and capsule components to do the collision detection against. The box and Capsule components are also the Root of the block and ball respectively.
Now, with these set up this way, and applied them to the classes by calling
or whatever the preset may be on that object. I have some weird issues.
The projectiles don’t hit the blocks, they hit the paddle and die. They should never hit the paddle, but the actors attached. NOT components. Other actors.
The paddle and its wall of blocks just fly right through the ball and don’t fire any hit events.
The paddle and its wall of blocks flies through the walls, and also the center net.