Skip to content

Commit

Permalink
Rotation gizmo for Ball 2d collider (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsk700 authored Jul 1, 2024
1 parent 0089365 commit 66b6b55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Unreleased

### Added
- Implement rotation gizmo for Ball 2D shape (as radius line) in Debug renderer if `DebugRenderMode::COLLIDER_SHAPES` enabled

## v0.21.0 (23 June 2024)

### Fix
Expand Down
7 changes: 7 additions & 0 deletions src/pipeline/debug_render_pipeline/debug_render_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ impl DebugRenderPipeline {
&Vector::repeat(s.radius * 2.0),
color,
true,
);
// Draw a radius line to visualize rotation
backend.draw_line(
object,
pos * Point::new(s.radius * 0.2, 0.0),
pos * Point::new(s.radius * 0.8, 0.0),
color,
)
}
TypedShape::Cuboid(s) => {
Expand Down

0 comments on commit 66b6b55

Please sign in to comment.