This is causing me no end of problems with my motorbike game, wheel colliders are no good and sphere colliders are just plainly the wrong shape. Please help !
You can make one by adding two colliders (a Capsule Collider and a Box Collider) to the same object.
You have to overlap them in such a way that their intersection generates a cylinder.
Then:
ushort triggered = 0;
void OnTriggerEnter() {
triggered++;
}
void OnTriggerExit() {
triggered--;
void Update() {
if(triggered == 2)
{
//inside cylinder collider
}
else
{
//outside cylinder collider
}
Add a mesh collider and set the mesh to Cylinder
Unfortunately you can’t really change the sizes and stuff