Dante-666 / bouncy-ball

hello world game for g3d development and learning
1 stars 0 forks source link

Implement CollisionCallback like functionality if possible, which can detect phase through collisions and apply forces to objects #33

Closed Dante-666 closed 3 years ago

Dante-666 commented 3 years ago

This is needed if we want the accelerator block to detect the ball's presence and push it forward. Investigate impulse forces and whatnot. Model the force also.

This would be needed to change the states of certain objects as well.

Dante-666 commented 3 years ago

Callback is not recommended in this stage because we may want to apply force to the player or the RigidBody when it is overlapping inside a btGhost object which seems to be the recommended way of doing it.

Dante-666 commented 3 years ago

added ForceFieldEntity to support and pass the force direction. It's best to do so via an interfaced method and should be computed by the Bullet Engine. This requirement emerges from the unidirectional map used. This seems like a suitable way of doing it by avoiding the bimap.

Dante-666 commented 3 years ago

Keeping it simple can overriding the onSimulation method of our G3D interface, since the ball is moving, assume these will run fast. Not too much to query. Later we need object pools and it will become more complicated as it will be implemented in Factories.

Dante-666 commented 3 years ago

There could be more behavior inheritance as needed in the case of time travel.