Please log in or register to post a reply.

No replies have been made yet.

- Upcoming Multiplatform Game Program...
- Our first game - looking for feedbacks
- Network Emulation Tool
- Trouble with accessing GLSL array
- Fiction
- Game Programming Patterns: Bytecode
- Interactive WebGL Water Demo
- Skeletal Animation Tutorial with GP...
- Unreal Engine 4
- Microsoft xbox one selling poorly

Im having some trouble rotating around a pivot point.

Would the process be to create the following Matrices and multiply them:

Offset1: Create a translation matrix based on pivot.Multiply(-1)

Offset2: Create a translation matrix based on pivot to move it back.

Create a rotate matrix by multiplying

(Offset1 * myrotation * Offset2) * existing rotation matrix

This sample code takes the original matrix, pivot point, and a vector change and creates a new matrix based on the above logic:

It seems to work but I have problems with objects that don’t have a pivot at the origin. ANy ideas?