mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-21 17:21:45 +00:00
WIP rcamera redesign vector (#2563)
* core functionality CAMERA_FREE * fix example * add remaining camera modes * add view bobbing * view bobbing * catch curser in SetCameraMode * adjust examples * fix compilation on linux * fix example text_draw_3d * actually fix text_draw_3d * Updated camera API * Improve Vector3RotateByAxisAngle() function * remove camera.mode dependency from low-level functions * remove camera.mode from struct * fixes after rebase * adjust examples for new UpdateCamera function * adjust example models_loading_m3d --------- Co-authored-by: Ray <raysan5@gmail.com>
This commit is contained in:
@@ -49,8 +49,6 @@ int main(void)
|
||||
camera.fovy = 45.0f;
|
||||
camera.projection = CAMERA_PERSPECTIVE;
|
||||
|
||||
SetCameraMode(camera, CAMERA_FREE);
|
||||
|
||||
float rotationSpeed = 0.2f; // General system rotation speed
|
||||
|
||||
float earthRotation = 0.0f; // Rotation of earth around itself (days) in degrees
|
||||
@@ -58,6 +56,7 @@ int main(void)
|
||||
float moonRotation = 0.0f; // Rotation of moon around itself
|
||||
float moonOrbitRotation = 0.0f; // Rotation of moon around earth in degrees
|
||||
|
||||
DisableCursor(); // Catch cursor
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
@@ -66,7 +65,7 @@ int main(void)
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera);
|
||||
UpdateCamera(&camera, CAMERA_ORBITAL);
|
||||
|
||||
earthRotation += (5.0f*rotationSpeed);
|
||||
earthOrbitRotation += (365/360.0f*(5.0f*rotationSpeed)*rotationSpeed);
|
||||
|
Reference in New Issue
Block a user