summaryrefslogtreecommitdiff
path: root/scene/3d/camera.cpp
AgeCommit message (Collapse)Author
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-11WIP CameraEffects implementation (bokeh not working for now)Juan Linietsky
2020-01-22Change CameraMatrix::get_viewport_size to get_viewport_half_extentslawnjelly
Fixes #26637. Fixes #19900. The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2. Code which called this function has also been modified accordingly. This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width. It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-09fixed camera project_position function that was still using the near ↵Ben Hickling
parameter in a few calculations
2020-01-02Update Camera.project_position to not return get_global_transform().origin ↵SIYU FU
if projection mode is orthogonal
2020-01-01Merge pull request #34665 from timothyqiu/camera-fovRémi Verschelde
Clamps fov/size for Camera gizmo
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-29Clamps fov/size for Camera gizmoHaoyu Qiu
2019-11-10Camera: Don't set default value for project_positionRémi Verschelde
A z_depth of 0 returns the camera position, which is not really useful. This also makes the API breakage from 3.1 clearer as 3.1 code will now fail to compile, so users will have to adapt and use the new parameter. For the reference, in 3.1, the z_depth was hardcoded to the near plane. Closes #33493.
2019-10-02Add missing semicolons to `BIND_ENUM_CONSTANT` macro usesHugo Locurcio
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-06-14Expose ClippedCamera clip_offsetjfons
2019-05-30Merge pull request #26942 from RandomShaper/fix-vp-issuesRémi Verschelde
Fix Viewport and Camera issues
2019-05-29Add a depth parameter to Camera::project_position()Cheeseness
2019-05-27add get_camera_rid methodJummit
2019-05-10Fixes to ClippedCameraJFonS
This work has been kindly sponsored by IMVU.
2019-04-23Merge pull request #26064 from JFonS/add_frustum_camera_modeHein-Pieter van Braam
Add FRUSTUM camera mode, allowing tilted frustums
2019-03-30Fix Viewport and Camera issuesPedro J. Estébanez
1. Consider 'own_world' as well as 'world' to stop propagating enter/exit world notifications. 2. Clean & fix handling of camera currency. This fixes some random crashes and error logs in the editor; namely - when enabling/disabling own world in a Viewport; - when switching back from a subscene displayed into a main scene's Viewport; - when exiting the editor after any of them; - memory corruption (can that explain certain other seemingly unrelated crash reports?). This also fixes situations where a Viewport and its main Camera get out of sync about which World is relevant to them.
2019-02-26Remove setting that caused is_inside_tree() errors on doppler tracking enabled.Juan Linietsky
2019-02-19Add FRUSTUM camera mode, allowing tilted frustumsJFonS
This new camera mode makes it easy to create tilted frustums for mirror or portal effects. This work was kindly sponsored by IMVU.
2019-01-28binding for get_frustum() of camera classYusuf
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-06Update FOV if edited in gizmo, fixes #16400Juan Linietsky
2018-08-23Add missing BIND_ENUM_CONSTANT to ClippedCameraMarcelo Fernandez
2018-08-21Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ↵Juan Linietsky
ability to choose between bodies and areas when colliding.
2018-08-21Clipped camera implementation, a camera that avoids going into geometry.Juan Linietsky
2018-08-10Merge pull request #20072 from RandomShaper/fix-camera-offsetsJuan Linietsky
Fix camera offsets not applied always
2018-07-29Add extra functions to toggle bits in visualinstance and camera, same as ↵Juan Linietsky
physics. Helps with #6685
2018-07-18Ability to disable scale in nodes, closes #19927Juan Linietsky
2018-07-09Fix camera offsets not applied alwaysPedro J. Estébanez
Specifically, project/unproject methods weren't taking them into account. Frustum computation may be affected as well. This commit considers them for the camera matrix at all times.
2018-05-16Allow editing of some unbound properties when hinted (or no range hinted)Juan Linietsky
2018-03-17a way to ensure that camera is disabledJakub Grzesik
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-26Merge pull request #14977 from volzhs/fix-crash-groupJuan Linietsky
Fix crash & error at saving scene
2017-12-25Fix error if scene has Camera at saving scenevolzhs
2017-12-22Fixes 3d camera keep aspect.Daniel J. Ramirez
2017-12-11[DOCS] Camera property changesWill Nations
2017-12-07Added some clean up in camera/viewport management. Fixes #12279, Fixes #12774Juan Linietsky
2017-11-25Tweak the default camera node settingsHugo Locurcio
- Increase FOV to 70 - Put the Z-near plane at 0.05 meters
2017-10-21Refactor Fixed to PhysicsPoommetee Ketson
2017-09-30Renamed fixed_process to physics_processAndreaCatania
2017-08-27Dead code tells no talesRémi Verschelde
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-20ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry
2017-08-10Removes type information from method bindsIgnacio Etcheverry
2017-07-15Lots of work on Audio & Physics engine:Juan Linietsky
-Added new 3D stream player node -Added ability for Area to capture sound from streams -Added small features in physics to be able to properly guess distance to areas for sound -Fixed 3D CollisionObject so shapes are added the same as in 2D, directly from children -Fixed KinematicBody API to make it the same as 2D.
2017-06-16Increase the default perspective camera FOVHugo Locurcio
This does not affect existing projects, but will affect newly-created editor settings and Camera nodes.
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde