Collider capsule in Blitz3d ?
Blitz3D Forums/Blitz3D Beginners Area/Collider capsule in Blitz3d ?
| ||
Hi, :) In the doc about EntityRadius it is written : EntityRadius(entity,x_radius#,y_radius#) Parameters entity - entity handle x_radius# - x radius of entity's collision ellipsoid y_radius# (optional) - y radius of entity's collision ellipsoid. If omitted the x_radius# will be used for the y_radius#. Does this mean it is possible to create a collider capsule ? From the description above, i understand i can create a collider capsule with for example 0.5 in width and depth and 2.0 in height. yes ? no ? If it is possible, is there a trick to use this command to create a collider capsule for a vehicle ? For example a collider capsule of 0.5 in height and width and 1.5 in depth ? I don't think so but maybe there is a trick ! Thanks, Last edited 2012 Last edited 2012 |
| ||
The collision body for the entity is only an ellipsoid (as it says right there), not a capsule. It's a stretched sphere, so doesn't have flat sides in the middle, and the ends are rather pointier. You could come up with some solution involving a group of child meshes, each with a purely spherical collision radius, arranged in a straight line. This would detect collisions more-or-less similarly to a capsule. Unfortunately that's about as close as you can get, since B3D only supports spherical moving colliders. You could also try an alternative collision engine such as ColDet (supports arbitrary shapes), or a full physics engine. |
| ||
It's a stretched sphere, so doesn't have flat sides in the middle, and the ends are rather pointier. Oh i see. Thanks for this precision. You could come up with some solution involving a group of child meshes, each with a purely spherical collision radius, arranged in a straight line. This would detect collisions more-or-less similarly to a capsule. Yes that's what i tried but i have not managed to have the 2 colliders sphere to stay locked on the starting position. I guess i have to try again :) Last edited 2012 Last edited 2012 |
| ||
Doesn't MeshesIntersect work for any shape? (If you have a fast computer and/or simple program...) |
| ||
I don't think it is possible to know the collision coordinates and the normal with MeshIntersect, and i need it. Anyway, i have managed to have the kind of collision i wanted with a collider sphere and a collider box for each mesh. This does not work properly yet but i think it can. |
| ||
Use a physics engine. |