Skip to content

Fix From<Rotation> implementation for Rot2#623

Merged
Jondolf merged 1 commit into
mainfrom
fix-rot2-from-rotation
Jan 11, 2025
Merged

Fix From<Rotation> implementation for Rot2#623
Jondolf merged 1 commit into
mainfrom
fix-rot2-from-rotation

Conversation

@Jondolf

@Jondolf Jondolf commented Jan 11, 2025

Copy link
Copy Markdown
Member

Objective

Fixes #617.

sin and cos are the wrong way around for our From<Rotation> implementation for Bevy's Rot2. This is currently used for center of mass updates in 2D, and the wrong order causes the center of mass vector to be perpendicular to what it should be.

Solution

Fix the order.

@Jondolf Jondolf added C-Bug Something isn't working A-Transform Relates to transforms or physics positions labels Jan 11, 2025
@Jondolf Jondolf enabled auto-merge (squash) January 11, 2025 01:06
@Jondolf Jondolf merged commit 4577abd into main Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Transform Relates to transforms or physics positions C-Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

center of mass vector issue?

1 participant