Hello! We’re building a 2,5D game that’s a helicopter’s battle.
The helicopters can fly in one of 2 different heights (plane). There’s a button that move the helicopter character to high height or lower height…
Higher plane, Z is fixed 600.
Lower plane, Z is fixed 15.
When there’s a collision (e.x. one player colides on other, or player colides in a tree or anything else from landscape), the helicopter bounces away in Z, like going from Z= 15 to Z= 20, and that breaks our game…
Is there any way to restrict collision physics in Z ?
What is it that you want to happen when you hit a mountain? It looks to me that your helicopter is driving up the mountain and that forward vector is now in charge of where it is heading like a rocket.
You could make a 90 degree vertical blocking volume/hidden wall so when the copter hits it will not go up but might get thrown backwards… You could also “Get Component Velocity” and then “Set Physics Linear Velocity” to the current X and Y but 0 for Z Every tick, this way it can still drive up the mountain but wont continue to climb upwards after.
I want it to bounce back when it hits a mountain, but just in X,Y.
its doing exactly what you say, its like my helicopter is “climbing” the mountain and then heading up like a rocket
-Put a hidden cube over the mountains (same as blocking volume but different)
-Put a box trigger over the mountains to generate an overlap event and push back the helicopter via blueprint
The core issue is that the helicopter is hitting a slope so physics says it should use that angle to bounce like a pool ball… You need it to hit a flat wall instead.