BabylonFan Posted November 16, 2015 Share Posted November 16, 2015 Hello, I have a problem with disposing objects. I generate multiple objects in my game and cannot seem to dispose them.Is there any way to destroy the objects? I also tried the dispose() method but it didn't quite work. Thank you! Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 16, 2015 Share Posted November 16, 2015 The dispose method is definitely the right way to go.Want to reproduce your scene in the playground and show us what's not working? Quote Link to comment Share on other sites More sharing options...
BabylonFan Posted November 16, 2015 Author Share Posted November 16, 2015 The code is too long to recreate it. The problem with dispose is that the object is in fact deleted from the scene but intersectsMesh() still perceives it as if it is still there. Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 16, 2015 Share Posted November 16, 2015 That seems like a bug. Shouldn't be like that.Could you reproduce with 2 objects in the playground? Are you constantly checking for intersections? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 16, 2015 Share Posted November 16, 2015 IntersectsMesh has to be called by you. So I assume you may have a list of meshes to check and perhaps you forgot to remove the disposed meshes from your list? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.