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

Getting post-update position: User Manual is out of date. #34

TerryHibbert opened this Issue Aug 1, 2017 · 2 comments


None yet
2 participants

TerryHibbert commented Aug 1, 2017

In section "9.3 Updating a Rigid Body", the code sample provided calls a non-existent "getInterpolatedTransform" method on RigidBody.

// Get the interpolated transform of the rigid body
rp3d::Transform transform = body->getInterpolatedTransform();

Is it now RigidBody::getTransform()? This unexpectedly holds all zeros for me. But that could be some other mistake I'm making.


This comment has been minimized.


DanielChappuis commented Aug 1, 2017

Thanks a lot for reporting this.

I have fixed this in the documentation in branch "develop" (commit dfb4b81). This will be integrated in the next release of the library.

Now you need to use the getTransform() method on a body to get the current transform. To avoid unpleasant visual effect, you also need to get the interpolated transform between the previous and the current frame as in the following code :

// Get the current transform of the rigid body
rp3d::Transform currentTransform = body->getTransform();

// Interpolate the transform between the previous one and the new one
rp3d::Transform interpolatedTransform = rp3d::Transform::interpolateTransforms(previousTransform, currentTransform, interpolationFactor);

You can see an example in the testbed application of the library.

@DanielChappuis DanielChappuis self-assigned this Aug 1, 2017

@DanielChappuis DanielChappuis added this to the Version 0.7.0 milestone Aug 1, 2017


This comment has been minimized.


DanielChappuis commented May 1, 2018

This issue has been fixed in the version v0.7.0 of ReactPhysics3D that has just been released.
Thanks a lot for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment