%player = %client.player;%raycast = containerRaycast(%player.getEyePoint(), VectorAdd(%player.getEyePoint(),VectorScale(%player.getForwardVector(),5)),$Typemasks::All); if(%raycast !$= "") %pos = getWords(%raycast,1,3); else %pos = VectorAdd(%player.getEyePoint(),VectorScale(%player.getForwardVector(),5)); %delta = vectorSub(%player.getPosition(), %pos); %deltaX = getWord(%delta, 0); %deltaY = getWord(%delta, 1); %deltaZ = getWord(%delta, 2); %deltaXYHyp = vectorLen(%deltaX SPC %deltaY SPC 0); %rotZ = mAtan(%deltaX, %deltaY) * -1; %rotX = mAtan(%deltaZ, %deltaXYHyp); %aa = eulerRadToMatrix(%rotX SPC 0 SPC %rotZ); %cam=%client.camera; %cam.setTransform(%pos SPC %aa); %cam.setFlyMode(); %cam.mode = "Observer"; %client.setControlObject(%cam); %cam.setControlObject(%player);
you should shrink that picture (use width=900 in the image tag like [img width=900]), take another picture of the setup and the direction your player is facing before doing the camera, and explain what we should actually be looking at