DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D
http://www.reactphysics3d.com
zlib License
1.55k stars 224 forks source link

Custom orientation #294

Closed v71 closed 9 months ago

v71 commented 2 years ago

Good day, sorry if this is a beginner question I want to use reactphysics3d in my project , and I need to detect collision between 'walls' and convex object, I was wondering if there is some function which accepts an orientation matrix computed somewhere else, since i am not using quaternion.

kewldan commented 2 years ago

Hello, You should check this method to create Quaternion from custom angles For example, my Object class has rigidbody member, and it contains position and rotation.

See also: Method for get rotation angles from Quaternion Method to get OpenGL matrix for transformations

DanielChappuis commented 2 years ago

Hello. There is also a constructor of the Quaternion class that takes a rotation matrix.

Quaternion::Quaternion(const Matrix3x3& matrix)

Note: Can I ask you next time to ask your question in the Discussions section instead of creating a new issue?

DanielChappuis commented 9 months ago

I am closing this issue. Feel free to open a new discussion if needed.