#So is OnCollisionEnter/OnTriggerEnter
1 messages · Page 1 of 1 (latest)
My MeshCollider looks like this. (I'm using it on '3D text')
It seems somewhat complex(?), but it's not super small or anything relative to the other collider (or in general), so kinda surprised it doesn't work, not even sometimes.
- Non convex mesh colliders are not supposed to be moved iirc.
- Convex mesh colliders could be as precise as any primitive collider.
- It's likely that you're doing something illegal, like moving or rotating the object via transform, which would cause issues for unity physics to detect collisions correctly.
Only the convex one is moving. The other is "catching"them.
And I was moving it via Transform to test, can't remember if I did without (runtime will be AddForce), let me chck
Rotation also matters. Not just movement.
Even with AddForce (not transform) moving them, the MeshColliders don't register an OnColliderEnter (but the Boxes still do).
Also quite confused why the instantiated objects tend to go backwards, and only sometimes forwards, despite calling rb.AddForce(instantiatedObj.transform.forward * shootForce) 🤨 . In theory wouldn't it go the same direction every time? The spawn point isn't rotating or anything.
Is the mesh collider paper thin?
As for why they're going back, you'll need to debug that.
Neither is paper thin. Yeah it's all a bit confusing right now
You should share some code. And setup screenshots.
Increasing the force multiplier seemed to fix that issue for now. I guess I'll just use box colliders.
The MeshCollider is created in script
You can pause the game, select the object and inspect it in the inspector.
This is the moving object in MeshCollider configuration and the 'Catcher' respectively