Rotation gizmo for Ball 2d collider (#670)

This commit is contained in:
Roman
2024-07-01 11:49:41 +03:00
committed by GitHub
parent 0089365e66
commit 66b6b55ea2
2 changed files with 12 additions and 0 deletions

View File

@@ -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

View File

@@ -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) => {