Closed Dante-666 closed 4 years ago
Made changes to the InitMethod which sets the scene correctly now. Saving objects would need to wait as it requires the conversion toAny which we should implement after modelling behavior. Right now, the selection widget and everything works almost fine because we are using the VisibleEntities methods but onSimulation hard sets the frame. We need a way to disable the physics calculations for the selected entity ideally done by the factory and add methods on the physics engine to do so. While selecting or deselecting, we can again decide the behavior. Basically detect that we are being edited and disable physics. We already have the map in the Physics implementation and we can simply implement the GFX object pool outside.
This issue is tangled with a lot of other problems that the good design fixes. Need to figure out how to do these things in stages.
So implemented the editor to allow for basic object selection and physics disabling, but restoring that requires some more work now. Figure out how to make it work for the basic RigidBody and updating the PAL with some methods. This would work for an independent commit that shows everything that's working. It may solve some problems with the simulation challenges. Later target the chain of execution as it ties well with the effort. Also create more tasks to enable the editor and camera following etc. This Tutorial needs the scene editor to be fully functional with the physics engine.
Added some methods for frameUpdate in the physics engine but this doesn't seem to update the object at all.
Changing the motionState doesn't help either. It could just be that we can't just do these things. There is also dead objects in the scene. The ball often finds itself dead.
The problem is the object lifecycle is not maintained well. The entities which are needed are recreated I guess without any repetations. The physics objects, not so much. We need to save this only now. No need to fix the Memory management after #37 that will be tackled in a different phase. Don't allow the Load method to work and add the scene by default.