Hi,
I'm stumped and could do with picking your brains if you can help...
I've got a weapon that's launched from the camera location, it has acceleration, ie each frame it's x, y and z are updated from xacc, yacc and zacc which are modified by various things in the play area (gravity wells etc).
Here's the problem, the above works fine if the camera is looking straight down the z axis, I need the initial accelerations to be converted from camera relative to global accelerations, ie modified by the current angle of the camera - but my maths limit has been reached I think, how can this be accomplished? anyone got a little example code to do the conversion and get me past this barrier?
Thanks guys.
I'm stumped and could do with picking your brains if you can help...
I've got a weapon that's launched from the camera location, it has acceleration, ie each frame it's x, y and z are updated from xacc, yacc and zacc which are modified by various things in the play area (gravity wells etc).
Here's the problem, the above works fine if the camera is looking straight down the z axis, I need the initial accelerations to be converted from camera relative to global accelerations, ie modified by the current angle of the camera - but my maths limit has been reached I think, how can this be accomplished? anyone got a little example code to do the conversion and get me past this barrier?
Thanks guys.