mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
added WIP collision
This commit is contained in:
parent
609dacf9f8
commit
6278049307
1 changed files with 9 additions and 1 deletions
|
@ -1416,6 +1416,7 @@ s32 Camera_Free(Camera* camera) {
|
|||
|
||||
f32 playerHeight = Player_GetHeight(camera->player);
|
||||
f32 sp94;
|
||||
CamColChk bgChk;
|
||||
|
||||
sCameraInterfaceFlags = norm1->interfaceFlags;
|
||||
|
||||
|
@ -1464,7 +1465,14 @@ s32 Camera_Free(Camera* camera) {
|
|||
OLib_Vec3fDiffToVecSphGeo(&eyeAdjustment, &camera->at, &camera->eye);
|
||||
OLib_Vec3fDiffToVecSphGeo(&eyeAdjustment, &camera->at, &camera->eyeNext);
|
||||
|
||||
if (Camera_BGCheck(camera, &camera->at, &camera->eye)) {
|
||||
VecSph collSphere;
|
||||
OLib_Vec3fDiffToVecSphGeo(&collSphere, &camera->at, &camera->eye);
|
||||
float rad = collSphere.r;
|
||||
camera->dist = eyeAdjustment.r = rad;
|
||||
} else {
|
||||
camera->dist = eyeAdjustment.r = 150;
|
||||
}
|
||||
|
||||
f32 newCamX = -D_8015BD7C->state.input[0].cur.cam_x;
|
||||
f32 newCamY = D_8015BD7C->state.input[0].cur.cam_y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue