I need to know what has changed in the gum/gu libraries in the past month, and how to rectify my code.
The code for positioning the camera is as follows:
Code: Select all
const dReal* carRot;
carRot = dBodyGetRotation(carBody);
ScePspFVector3 cameraPos = { 0, 4, -10};
ScePspFVector3 lookAtPos = { 0, 0, 0};
ScePspFVector3 upVec = { 0, 1, 0};
upVec.y = 1;
float awayFrom;//distance from center to camera
awayFrom = (circleCamY/50)*20.0f;
float pointX;
float pointY;
float angle;
pointX = (dBodyGetPosition(carBody)[0]-(carRot[9]*camDistance));
pointY = (dBodyGetPosition(carBody)[2]+(carRot[1]*camDistance));
cameraPos.x = pointX;
cameraPos.y = dBodyGetPosition(carBody)[1]+5.0f;
cameraPos.z = pointY;
lookAtPos.x = dBodyGetPosition(carBody)[0];
lookAtPos.y = dBodyGetPosition(carBody)[1];
lookAtPos.z = dBodyGetPosition(carBody)[2];
sceGumLookAt(&cameraPos, &lookAtPos, &upVec);
I hope you can help.