I am creating a game and decided to migrate my code and use BepuPhysics.
The engine is really easy to use and works just amazing, however, Ithink I am overcomplicating my rotation method for players and game objects.
Basically, I am using something like:
Code: Select all
Public void RotateOnYAxis(float radiants)
{
Body.OrientationMatrix = Matrix3x3.CreateFromAxisAngle(Vector3.Up, radiants);
}
This way, I can get my entities orientation vector from Body.OrientationMatrix.Forward.
Is there a better way (or more efficient) to make an entity rotate around a given axis? BepuPhysics seems very advanced and I have the impresion that I am doing it the wrong way, but I cannot find any method or property to apply a rotation in a more straightforward maner.
Just two apretiations:
-I am blind, so perhaps my method is not working so well, but it's hard to perform tests like that without a visual representation.
-And english is not my native language, so excuse me if it doesn't make sense at all...
Thanks in advance!