Ok, so here is the problem. I have a model that was made in 3ds max and converting to .x using conv3ds. I am using the model as a placeholder until I get a final main character model but as I'm seeing this issue arise now, I'd rather have it figured out before we have a finished main character. I'm using some common 3rd person camera code utilizing "set camera to follow". The code is shown below:
sync on
sync rate 30
set display mode 800, 600, 32
startlocX as integer = 400
startlocY as integer = -100
startlocZ as integer = 0
speed as integer = 7
camX as float = 0
camZ as float = 0
objX as float = 0
objZ as float = 0
MaxZoom as integer = 0
MinZoom as integer = 0
Angle as integer = 0
load object "Bulb.x", 1
make object box 2, 1300, 100, 200
make object box 3, 400, 100, 400
position object 2, 0, -200, 0
position object 1, startlocX, startlocY, startlocZ
position object 3, 0, -200, -200
do
Angle = object angle y(1)
if inkey$() = "d" then yrotate object 1, wrapvalue(Angle+5)
if inkey$() = "a" then yrotate object 1, wrapvalue(Angle-5)
if inkey$() = "w" then move object 1, 10
if inkey$() = "s" then move object 1, -10
if escapekey() = 1 then exit
objX = object position x(1)
objZ = object position z(1)
set camera to follow objX, startlocY, objZ, object angle y(1), 200, 100, 5, 1
text 10, 10, "Object 1 Position- X: " + str$(object position x(1)) + " Y: " + str$(object position y(1)) + " Z: " + str$(object position z(1))
text 10, 30, "Camera 1 Rotation- X: " + str$(camX)
text 10, 50, "CamPos: " + str$(camPos)
sync
loop
end
The problem here is that when the App is compiled and runs, this is what is shown on the screen:
I cannot for the life of me figure out how to get the model object rotated so the camera is BEHIND the character rather than to the side. If I alter the objects rotation, it also screws up the movement since "move object" only wants to move the object forward and backward in relation to its rotation. W and S become strafe left and strafe right rather than forward and back in this case.