How do I make an Underwater breathing blueprint
I want to make an Under water breathing blueprint, as when my character is under water this bar starts to decrease and when he is above water this bar first gets full and then disappears. Help me guys, Ive been trying to figure this out for a while now
asked Apr 07 '15 at 06:28 AM in Blueprint Scripting
On the Character Class
If you check the Movement Mode, you can get if they're swimming. Then you can get the current PhysicsVolume from the Character Movement, and from there check if its a water volume which I already assume it is. This CheckIfUnderWater will get the current PhysicsVolume, check Actor bounds against the player's Z and if it meets a certain condition to save the time they entered. Then use this timestamp to check how long they've been underwater. A cheaper check would be to send a line trace from the Actor location straight up, and make your Volume block Camera traces.
I hope this helps!
Follow this question
Once you sign in you will be able to subscribe for any updates here