mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-05 09:26:26 +00:00
REPLACE: TABS by 4 spaces
This commit is contained in:
@@ -160,7 +160,7 @@ Matrix GetCameraProjectionMatrix(Camera* camera, float aspect);
|
|||||||
// MatrixOrtho()
|
// MatrixOrtho()
|
||||||
// MatrixIdentity()
|
// MatrixIdentity()
|
||||||
|
|
||||||
// raylib input functionality required: GetMouseDelta(), GetMouseWheelMove(), IsKeyDown(), IsKeyPressed()
|
// raylib required functionality: GetMouseDelta(), GetMouseWheelMove(), IsKeyDown(), IsKeyPressed(), GetFrameTime()
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
@@ -195,7 +195,7 @@ Matrix GetCameraProjectionMatrix(Camera* camera, float aspect);
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module specific Functions Declaration
|
// Module specific Functions Declaration
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
//...
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Definition
|
// Module Functions Definition
|
||||||
@@ -218,6 +218,7 @@ Vector3 GetCameraRight(Camera *camera)
|
|||||||
{
|
{
|
||||||
Vector3 forward = GetCameraForward(camera);
|
Vector3 forward = GetCameraForward(camera);
|
||||||
Vector3 up = GetCameraUp(camera);
|
Vector3 up = GetCameraUp(camera);
|
||||||
|
|
||||||
return Vector3CrossProduct(forward, up);
|
return Vector3CrossProduct(forward, up);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,8 +422,8 @@ void UpdateCamera(Camera *camera, int mode)
|
|||||||
|
|
||||||
if (mode == CAMERA_ORBITAL)
|
if (mode == CAMERA_ORBITAL)
|
||||||
{
|
{
|
||||||
// Obital can just orbit
|
// Orbital can just orbit
|
||||||
Matrix rotatation = MatrixRotate(GetCameraUp(camera), CAMERA_ORBITAL_SPEED * GetFrameTime());
|
Matrix rotatation = MatrixRotate(GetCameraUp(camera), CAMERA_ORBITAL_SPEED*GetFrameTime());
|
||||||
Vector3 viewVector = Vector3Subtract(camera->position, camera->target);
|
Vector3 viewVector = Vector3Subtract(camera->position, camera->target);
|
||||||
viewVector = Vector3Transform(viewVector, rotatation);
|
viewVector = Vector3Transform(viewVector, rotatation);
|
||||||
camera->position = Vector3Add(camera->target, viewVector);
|
camera->position = Vector3Add(camera->target, viewVector);
|
||||||
|
Reference in New Issue
Block a user