dimforge / dimforge/rapier

Feature Request: Axis alignment choices for cylinder colliders

Open
#778 2 comments 0 reactions 0 assignees View on GitHub
A-Geometry C-Enhancement D-Easy good first issue P-Medium
Dominant language
Rust
Stars
5.7k
Forks
387
Avg merge
4d 23h
Merged PRs (30d)
6

Description

The cylinder collider currently only follows a y-up convention by default with the given constructor `Collider::cylinder()`, where the `height` parameter will result in the cylinder growing in the positive y axis direction. This becomes a slight nuisance since unlike most other primitive collider geometry, wanting to have a z-aligned / x-aligned cylinder means creating a y-aligned cylinder and then having to apply an extra rotation for that specific collider.

I found this issue to stand out the most when interpreting geometry from external files(e.g. URDF) that follow different coordinate systems using the z-axis as the upwards direction, since the local transforms for the cylinders will always end up having an extra rotation to be aligned to the z-axis compared to other instantiated collider geometry.

I think it would be nice to expose APIs for constructing cylinder colliders aligned to different axis, in constructor forms like there already exists for capsule colliders: `Collider::capsule_x`, `Collider::capsule_y`, `Collider::capsule_z`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.