Hey Guys,
While I find myself pretty versed in basic rendering concepts, and having picked up a little bit of vector, and matrice algebra in my studies, I still find my Mathematics skills haven't completely caught up.
So I have a few questions for something I wanted to implement. Say I have a platform sitting atop a invisible pedastle over something hazardous (Say lava). And depending on where players stand on this platform affects the tilting, or rotation of said platform. Would my thought process I have in place (Haven't coded it yet) be on par, or in need of total revision, or a little of both?
Say the diameter of my platform is 10 (It's a cylinder). Making the radius 5. If I took the players position relative to the distance of the center of the cylinder (Them both being in world space), and normalized it, than used it for a scalar for the axis of rotation would it work well?
normalization
playerPositionX -= cylinderTopCenter
playerPositionX = (positionX + (-5.0f)) / (5.0f+(-5.0f)) //Diameter is 10
xRotation = 0.8 * playerPositionX //Use the normalized value as a scalar for the max
//rotation on any given axis, say, in radians, 0.8
Rinse, and repeat for the Y Axis.
I'm pretty sure this should work, and I feel this is pretty simple. But, I could be very much off track as well. Let me know what you guys think.
Thanks!
Marcus Hansen