Here I come with a new question!
I have a class that extends Object3D and implements a collision listener. I want to do the following: when the player crashes against this object3D, it must replace the 3D model it's showing, to represent a broken object. I only want the model+texture coordinates to change, I want to keep the texture file it's using, position, rotation, shader, etc. (as it's the same 3D model but broken down)
This object3D extension implements the listener collision(CollisionEvent arg0). Is it possible to change the model of this Object3D from that method? setMesh doesn't seem to do the trick and I read on another post that it doesn't pass texture coordinates so my only option would be to create a new Object3D cloning the one in my model pool, remove the old one from the World and insert the new one, but this collision listener function is inside the Object3D I would have to remove so i'm a bit confused on how to do this.
If there's no other way I'll have to manually set a boolean on this object and make an external class (world) check it and replace this object. But I prefer to ask here before doing those things!
Any help would be appreciated