How to hide body during runtime. #1546
-
Hi, currently in my game engine I have this function
That determines if an entity is visible or not. However if it is set to false, the body created remains as an invisible collider. This is the definition of the SetActive and SetInactive.
The body of the entity still remains as I am able to see it in the debugrender and collide with it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I would expect Have you stepped into the code? It must early out somewhere (maybe the |
Beta Was this translation helpful? Give feedback.
I would expect
RemoveBody
to completely remove it from the world. This should stop rendering it and you should certainly not collide with it. The locking body interface only needs to be used if you add/remove bodies/query from multiple threads.Have you stepped into the code? It must early out somewhere (maybe the
bodyID
is invalid)?