Collider shape?

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.
Post Reply
Qweasy908
Cyborg
Posts: 86
Joined: Jul 18th '18, 22:45

All objects have a radius and height.
Is the collider shape a capsule or do the objects not have a collider?
A capsule is two spheres with radius and height.
I'm asking about how the collision detection works.
User avatar
Meerjel01
Mjolnir Mark IV
Posts: 422
Joined: Nov 4th '17, 09:59

Unity has it as a cylinder with 2 half spheres as I've read it.

You can also have this if not knowing about it. I also have problems with collision in my engine.
Qweasy908
Cyborg
Posts: 86
Joined: Jul 18th '18, 22:45

Meerjel01 wrote: May 2nd '22, 15:27 Unity has it as a cylinder with 2 half spheres as I've read it.

You can also have this if not knowing about it. I also have problems with collision in my engine.
Thanks.

I still use a character controller with a capsule shape in Unity.
Portals are too simple of a shape to use with the mesh collider in Unity so I made custom collision with the portals.
The closest point on triangle to point works well with the camera point and a triangle portal mesh.
If the projected camera point is in a triangle and the distance to portal plane is less than the radius of the player then the sector turns on.
I found a book with information about sphere to sphere collisions and sphere to triangle collision tests with some info about capsules.

Real-Time Collision Detection
https://www.amazon.com/Real-Time-Collis ... 1558607323

Closest Point on Triangle to Point is on page 136.
Post Reply