- Home /
fluid detection for player in complex shape
Hello !
For a personal project, I wanted to create a minecraft-like fluid physic but i'm stuck at the detection of the water for player or any other objects colliding with water or fluid-like material.
Currently i'm using procedurally generated mesh for my terrain, during the generation i also create a solid mesh collider and fluid mesh collider which is on a different physic layer to avoid collisions. I'm having trouble with the detection of this fluid, i need a safe and efficient solution to check if my player or a primitive is in contact with fluid.
Sadly unity does not provide tool to create fluid-physic in a mesh or a primitive or even to check if a point is in a mesh collider without raycasting to infinity and count the mesh intersections ...
Project pictures: Visible chuck without fluid collider.
fluid collider (in green) and visible chunk in blue.
solid collider (in green), exact reverse of the previous picture and fluid collider in blue.
Meadjix.
Your answer
Follow this Question
Related Questions
Raycast not detecting ground after rotating 0 Answers
HOW TO MAKE ENEMY SHOOT ONLY PLAYER 2 Answers
Movement script breaks colliders 1 Answer
Simulating the Character Controller? 0 Answers
Collision Detection Issue with SetActive(false) not working 2 Answers