Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

CapsuleCollider properties not aligned with Unity capsule collider component #244

Open
aljosic opened this issue Nov 6, 2020 · 1 comment

Comments

@aljosic
Copy link

aljosic commented Nov 6, 2020

There's this diff between how MRE and Unity look at capsule colliders. MRE says a capsule collider has a Vector3 size and then pulls out Height and Direction according to relations of components of that vector, assuming that height is always bigger than radius and Direction always being the index of the biggest component of that vector. I believe this leads to unwanted behavior when initializing colliders.

Should this be more aligned to how Unity treats it, Direction being an axis, height a float along that axis, and radius being perpendicular to it ?

@aljosic
Copy link
Author

aljosic commented Nov 7, 2020

The issue is actually a different behavior in how capsule primitives vs capsule colliders get created through the SDK.
A capsule mesh is created with AssetContainer::createCapsuleMesh that throws if (height < 2 * radius), whereas a ColliderInitialPath is applied from CapsuleColliderGeometry without that check, causing the Unity Collider component to misbehave.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant