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

Add rigidBody.velocityAtPoint #305

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexandernanberg
Copy link
Contributor

Closes #304

@@ -297,6 +298,11 @@ impl RawRigidBodySet {
self.map(handle, |rb| RawVector(*rb.angvel()))
}

/// The velocity of the given world-space point on this rigid-body.
pub fn rbVelocityAtPoint(&self, handle: FlatHandle, point: &RawVector) -> RawVector {
self.map(handle, |rb| rb.velocity_at_point(&Point::from(point.0)).into())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if &Point::from(point.0) is the right approach? Tried point.0.into() like in other places but the compiler wasn't happy with that

@alexandernanberg alexandernanberg force-pushed the add-rb-velocity-at-point branch from 0aac761 to 9f4a9d0 Compare March 2, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RigidBody.velocityAtPoint
1 participant