Jump to content

Admin

Administrators
  • Posts

    3,209
  • Joined

  • Last visited

Blog Comments posted by Admin

  1.  

    I hope it can be disabled to ignore the child, because I would really like that if someone pulls on an arm, the whole body would follow the movement.

    There shouldn't be a problem when multiple force sources affect a body, because naturally all the forces just add/substract on the body.

    That happens right now if you connect two bodies with a joint. It sounds like you are describing a mixture of forward kinematics (animation) and inverse kinematics (physics), which actually doesn't sound unrealistic. We already have code to move and rotate a physics body where we want it to be. Maybe animation can use this when the child entity has mass.

  2. so no more saving OBJ's if i follow correctly? this creates the physics shape from the MDL mesh? if so, thats great since that was always annoying to have to create OBJ's and GMF's.

    You can still model a separate physics model and convert it into a convex hull shape, but you can just create a convex decomposition on the original visual model. A hand-made collision shape will be more accurate, but it's not always needed. We can probably also make them out of brushes and save them in the editor.

     

    Can you explain what you mean by "attach that shape to the model and save it as a prefab"? How is the shape attached to the model? And how is it being saved as a prefab? Is a prefab a separate file type?

    There's a property in the physics settings that lets you choose a *.phy file. This overrides the auto-generated shape, if one is chosen in the drop-down box above that. If you want to reuse the model + physics, just save it as a *.pfb (prefab) file. Like 3D World Studio, these can be reused and carry more information than just a dumb model file. In fact, you'll probably be using prefabs when you build a scene more than plain models (since a prefab is a model + extra info like physics). This is better than resaving the model from the editor, because you can still update the model in Blender or whatever, and the extra info you add won't get overwritten by your modeling program.

     

    Also, was there not a plan at one point to have some sort of visual physics editor to allow for easy construction of joints? Is this still a possibility? Or has this already been included into the editor?

    You're looking at the beginning of that. I haven't actually implemented joints yet, but I'm thinking about making them an entity. That way they can have scripts attached to them, and they can be displayed in the editor with the regular rendering routine.

  3. Very cool stuff! Does this work at all with models with movable joints? I suppose you would do a separate convex decomp for each model child in the heirachy?

    In LE2 we followed a rule that only top-level entities should be physically active. This is because when a parent moves, the child moves with it, and that would override the physics behavior. I am toying with the idea of allowing physics at any stage in the hierarchy, in which case the parent motion would get ignored by the child.

  4. Nice work Josh. A couple of people in this thread have asked for more advanced usage and I think all this boils down to one broad question: How exposed is the path finding module to the developer?

    Do you think more exposure is required in your opinion?

    It's best to let the navmesh system handle the character movement for AI, because it will calculate avoidance with other characters. If you just plot a path and move there, it won't calculate crowd avoidance.

×
×
  • Create New...