More Physics Phun
Physics works great with scaled entities:
For joints in the new engine, I am considering something fairly radical. In Leadwerks Engine 2, joints were just a class that wasn't an extension of the entity class. I was going to make a new Joint class that extends the Entity class. The problem is you would end up inserting a ton of intermediary joint entities into your model hierarchy, which would hurt the editor's ability to reload models on the fly.
What if joints were just a feature in the Entity class? You could set an entity's joint mode and that would create a joint between itself and its parent. You could go through the hierarchy of a character and easily set up ball and hinge joints within the model hierarchy to make a rag doll:
Of course this means no entity can be the child of two joints. Joint hierarchies would have to go one-way. For example, if you had a connection like this:
[Parent] - Joint - [Child] - Joint - [Parent]
It would have to be arranged like this instead:
[Parent] - Joint - [Child] - Joint - [Child of Child]
For example, in the picture below #1 is the top-level parent, and the children are numbered as they descend. If the blocks are each connected with joints, you will run into problems with the fifth level down, because you are trying to connect the child to two different parents:
Are people really going to be making suspension bridges that disconnect and reconnect multiple times? Not sure yet if this would pose a problem or not. However, it would be super convenient to be able to load up that buggy model and add joints to the wheels and turret, without having to create and position new joint entities. It totally eliminates the problem of having to figure out which entities are attached to which joint.
--EDIT--
Hmmmm, maybe this isn't such a hot idea. Here's a situation where the design would totally fail:
Since our physics are the only ones stable enough for robotics and scientific simulations, I think it needs to be able to accommodate complex machinery.
- 1
4 Comments
Recommended Comments