I have a character that works with the ALS plugin and it works great, but I still have a problem that I couldn’t solve. I would like my character to dive into the water when the player jumps to a water spot. The problem is that I haven’t found a way to know if there is water in front of the player while respecting the following constraints:
The water mesh would be procedurally generated, so the trigger box is probably not the answer.
I would have some cliffs, so the height difference between my character and the water mesh is unknown.
The world would be dynamic and could change during the game, so the place of the water points too. It should not be an actor placed in the world, but really a detection with the character plan.
I thank you in advance, it’s been a week that I tear my hair out on the subject and can’t find any solutions.
Yes, but it’s too imprecise, the angle needed for the situation changes, so it doesn’t work. I need something with a margin, as if there was a point in the cylinder in front of me, but without a cylinder.er.
I’m not sure what the issue is, can you expand on this? I understand what you’re trying to accomplish in broad strokes but I don’t understand why line trace isn’t appropriate for this scenario.
There are also different types of traces besides line - there are box or sphere traces which provide more complex shapes that could provide you with more options for your application.
This code asset accomplishes context-sensitive diving animations, but I think the way it does so is based on line traces. You could take a look, but it might not solve the issue you’re experiencing.
It would certainly help me, but I try to do my own little game. And that, without buying anything.
I know it seems difficult, but for now it’s only for me and my friends, the game is not advanced enough to share it.
yeah I think there is already a premade channel just for water.
But the idea is that you can mark different types of things for different types of collisions. So in this case your capsule will only look specifically for items marked “water”.
This is just how game development is. Computers are idiots so you have to go to great lengths to explain every detail to them :).