Well, I’m kinda working with my friends on a game, using Maya to make the models.
But I have to ask, is it better to create my collision “solids” in maya or in panda3D?
Because I (finally) had the idea of actually creating collision “solids” using Maya instead of Panda3D, because I am really sick of having to type the code out, and later having it being screwed up when I try to scale the object (like when I’m creating different sized objects)
But the one thing I would like to ask is, would having ALL of my models with an extra collision “solid” inside it affect my game too badly? If, say, the collision solids are very basic, like a rough sphere, a box, etc. 'cuz I fear that it will lag my game really badly…
without being an expert on the matter, I would suggest you handle your collision directly in panda3d.
it’s built to handle it, especially if you want to use rough-shaped objects, and coding this part shouldn’t be too hard, even if you are not an expert coder.
i dont really know about the maya->panda exporter, but if you want to create collision solids in maya you should check if the exported colliders are collision-solids (like spheres, planes, etc.) and not collision-models (made out of polygons).
calculating a collision between 2 collision models is way more computing intensive then between the basic solids in panda. this example below is not exact, but giving a idea of how much more calculation is required for mesh-colliders then sphere-colliders:
for example having a model with a collision sphere colliding with another collision sphere is:
- (distance between the 2 objects) - (sum of radius of both objects)
for 2 polygon models with 100 poly’s its:
- check if the bounding sphere's of the models intersect (like sphere-sphere collision)
- for i in polygonsOfModel1:
- for j in polygonsOfModel2:
- check if the polygons collide (way more complicated then the sphere collision)
that makes it more then 10’000 slower then the sphere collisions, if they intersect.
maybe you could place empties into the model, with tags of a special name:
- would be a collision sphere with radius 1.0
- would be a collision tube with length 1.0 and radius 2.0
Thanks for the opinions guys.
And… Well… How about when I have to modify the object which has the collision solid attached to it? I ALWAYS get messed up whenever I try to modify the object with the collision solid… Hell, I don’t even know exactly how collision solids work, honestly. So… Is there a way how to avoid the collision solid’s dimensions messing up when I modify the object?
And about what you said, Hypnos, I’m… not too sure how to create collision-solids in maya, or at least, converting a model to a collision solid… Any idea how to do that?