Making a 3D side-scroller, and I’m trying to create a slope that, when the player shoots it, the bullet bounces off at a 90 degree angle. I have four ramps set up R1, R2, R3, and R4 (see below) and if I shoot R1 the bullet reflects off it as shown by the yellow arrows.
My problem is the other ramps aren’t working as they should. If I stand directly under R2 and shoot up, the bullet with velocity (0,0,1000) hits the block and changes velocity to (-1000, 0, 0) but travels straight down into the ground instead of to the left, same with R3. And if the bullet bounces from R3 down to R4, then it will bounce back and forth between R3 and R4. However, if it bounces straight down from R2, it will hit R1 and get stuck.
This is my blueprint for finding the reflected angle:
Which sends the vector to the “Set Velocity in Local Space” node, attached to the bullet’s projectile movement component.
I’m not sure what I’m missing here to make the bullet travel in the correct direction.