Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flipped rotation for joint's angular limit gizmo again #936

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Breaking changes are denoted with ⚠️.
- ⚠️ Changed the inertia of shapeless bodies to be `(1, 1, 1)`, to match Godot Physics.
- Changed `SeparationRayShape3D` to not treat other convex shapes as solid, meaning it will now only
ever collide with the hull of other convex shapes, which better matches Godot Physics.
- Mirrored the way in which angular limits are visualized for `JoltHingeJoint3D`,
`JoltConeTwistJoint3D` and `JoltGeneric6DOFJoint`.

### Added

Expand Down
4 changes: 2 additions & 2 deletions src/joints/jolt_joint_gizmo_plugin_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void draw_angular_limits(
auto calculate_point = [&](int32_t p_index) {
const float angle = p_limit_lower + angle_step * (float)p_index;

const float x = GIZMO_RADIUS * cosf(-angle);
const float y = GIZMO_RADIUS * sinf(-angle);
const float x = GIZMO_RADIUS * Math::cos(angle);
const float y = GIZMO_RADIUS * Math::sin(angle);

return to_3d(p_axis, x, y);
};
Expand Down