how do i detect one mesh is inside of another mesh at runtime
i am doing mesh deformation , i have 2 objects one is outsider and other one in placed inside it i have to deform the just outer object only , when i deform the outer object i goes inside the inner object completely , but i am unable to detect on run time when the outer object is invisible , means i have to complete the level when it goes invisible i tried the Raycast , but Raycast detect the first collided gameobject , dose not matter its inside another or not
Answer by lgarczyn · Dec 03, 2019 at 03:14 AM
A raycast doesn't detect a mesh, only a collider. It won't detect concave colliders either.
Simply reduce the scaling of the outside gameobject through the deformation, and when it reaches some value (that you chose), it means it disappeared.
Your answer
Follow this Question
Related Questions
Update() and FixedUpdate() not running on C# scripts 0 Answers
Assigning a PreFab to a pre existing variable. 0 Answers
Creating Splines from empties in script 0 Answers
Why is the code below not setting the value for the timer? 0 Answers
Multiple GameObjects with the same Script are sharing the same bool values when they shouldn't. 1 Answer