From eaaee63b629d6999fcc0c84e38886b964f6d051d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 30 Mar 2020 18:22:57 +0200 Subject: doc: Update classref with node renames A few extra renames for classes which were missed in last week's PRs. --- doc/classes/@GlobalScope.xml | 28 +- doc/classes/ARVRAnchor.xml | 2 +- doc/classes/ARVRCamera.xml | 2 +- doc/classes/ARVRController.xml | 2 +- doc/classes/ARVROrigin.xml | 2 +- doc/classes/ARVRServer.xml | 2 +- doc/classes/AnimatedSprite.xml | 87 - doc/classes/AnimatedSprite2D.xml | 87 + doc/classes/AnimatedTexture.xml | 4 +- doc/classes/Area.xml | 247 -- doc/classes/Area3D.xml | 247 ++ doc/classes/ArrayMesh.xml | 4 +- doc/classes/AudioStreamPlayer3D.xml | 2 +- doc/classes/BaseMaterial3D.xml | 4 +- doc/classes/BoneAttachment.xml | 20 - doc/classes/BoneAttachment3D.xml | 20 + doc/classes/BoxShape.xml | 20 - doc/classes/BoxShape3D.xml | 20 + doc/classes/CPUParticles.xml | 385 -- doc/classes/CPUParticles2D.xml | 4 +- doc/classes/CPUParticles3D.xml | 385 ++ doc/classes/Camera.xml | 237 -- doc/classes/Camera3D.xml | 237 ++ doc/classes/CanvasItem.xml | 2 +- doc/classes/CanvasItemMaterial.xml | 6 +- doc/classes/CapsuleShape.xml | 23 - doc/classes/CapsuleShape3D.xml | 23 + doc/classes/ClippedCamera.xml | 110 - doc/classes/ClippedCamera3D.xml | 110 + doc/classes/CollisionObject.xml | 219 -- doc/classes/CollisionObject3D.xml | 219 ++ doc/classes/CollisionPolygon.xml | 27 - doc/classes/CollisionPolygon3D.xml | 27 + doc/classes/CollisionShape.xml | 40 - doc/classes/CollisionShape3D.xml | 40 + doc/classes/ConcavePolygonShape.xml | 32 - doc/classes/ConcavePolygonShape3D.xml | 32 + doc/classes/ConeTwistJoint.xml | 80 - doc/classes/ConeTwistJoint3D.xml | 80 + doc/classes/ConfigFile.xml | 2 +- doc/classes/ConvexPolygonShape.xml | 20 - doc/classes/ConvexPolygonShape3D.xml | 20 + doc/classes/Curve3D.xml | 6 +- doc/classes/CylinderShape.xml | 23 - doc/classes/CylinderShape3D.xml | 23 + doc/classes/DirectionalLight.xml | 63 - doc/classes/DirectionalLight3D.xml | 63 + doc/classes/EditorFeatureProfile.xml | 2 +- doc/classes/EditorNode3DGizmo.xml | 189 + doc/classes/EditorNode3DGizmoPlugin.xml | 198 ++ doc/classes/EditorPlugin.xml | 8 +- doc/classes/EditorSpatialGizmo.xml | 189 - doc/classes/EditorSpatialGizmoPlugin.xml | 198 -- doc/classes/Environment.xml | 4 +- doc/classes/GIProbe.xml | 4 +- doc/classes/GPUParticles2D.xml | 87 + doc/classes/GPUParticles3D.xml | 122 + doc/classes/Generic6DOFJoint.xml | 426 --- doc/classes/Generic6DOFJoint3D.xml | 426 +++ doc/classes/GeometryInstance.xml | 103 - doc/classes/GeometryInstance3D.xml | 103 + doc/classes/HeightMapShape.xml | 26 - doc/classes/HeightMapShape3D.xml | 26 + doc/classes/HingeJoint.xml | 121 - doc/classes/HingeJoint3D.xml | 121 + doc/classes/ImmediateGeometry.xml | 110 - doc/classes/ImmediateGeometry3D.xml | 110 + doc/classes/Input.xml | 477 --- doc/classes/InputDefault.xml | 15 - doc/classes/InputEventFromWindow.xml | 17 + doc/classes/InputEventScreenDrag.xml | 2 +- doc/classes/InputEventScreenTouch.xml | 2 +- doc/classes/InputEventWithModifiers.xml | 2 +- doc/classes/InputFilter.xml | 477 +++ doc/classes/InterpolatedCamera.xml | 36 - doc/classes/Joint.xml | 29 - doc/classes/Joint3D.xml | 29 + doc/classes/KinematicBody.xml | 181 - doc/classes/KinematicBody3D.xml | 181 + doc/classes/KinematicCollision.xml | 51 - doc/classes/KinematicCollision3D.xml | 51 + doc/classes/Light.xml | 138 - doc/classes/Light3D.xml | 138 + doc/classes/Listener.xml | 45 - doc/classes/Listener3D.xml | 45 + doc/classes/Material.xml | 2 +- doc/classes/Mesh.xml | 8 +- doc/classes/MeshInstance.xml | 74 - doc/classes/MeshInstance2D.xml | 2 +- doc/classes/MeshInstance3D.xml | 74 + doc/classes/MeshLibrary.xml | 4 +- doc/classes/MultiMesh.xml | 2 +- doc/classes/MultiMeshInstance.xml | 24 - doc/classes/MultiMeshInstance2D.xml | 2 +- doc/classes/MultiMeshInstance3D.xml | 24 + doc/classes/Navigation.xml | 83 - doc/classes/Navigation2DServer.xml | 298 -- doc/classes/Navigation3D.xml | 83 + doc/classes/NavigationAgent.xml | 165 - doc/classes/NavigationAgent3D.xml | 165 + doc/classes/NavigationObstacle.xml | 31 - doc/classes/NavigationObstacle2D.xml | 2 +- doc/classes/NavigationObstacle3D.xml | 31 + doc/classes/NavigationRegion.xml | 42 - doc/classes/NavigationRegion3D.xml | 42 + doc/classes/NavigationServer.xml | 375 -- doc/classes/NavigationServer2D.xml | 298 ++ doc/classes/NavigationServer3D.xml | 375 ++ doc/classes/Node3D.xml | 350 ++ doc/classes/Node3DGizmo.xml | 13 + doc/classes/NodePath.xml | 34 +- doc/classes/Object.xml | 2 +- doc/classes/OmniLight.xml | 33 - doc/classes/OmniLight3D.xml | 33 + doc/classes/Particles.xml | 122 - doc/classes/Particles2D.xml | 87 - doc/classes/ParticlesMaterial.xml | 6 +- doc/classes/Path.xml | 28 - doc/classes/Path3D.xml | 28 + doc/classes/PathFollow.xml | 56 - doc/classes/PathFollow3D.xml | 56 + doc/classes/Performance.xml | 2 +- doc/classes/PhysicalBone.xml | 79 - doc/classes/PhysicalBone3D.xml | 79 + doc/classes/PhysicalSkyMaterial.xml | 2 +- doc/classes/Physics2DDirectBodyState.xml | 218 -- doc/classes/Physics2DDirectBodyStateSW.xml | 15 - doc/classes/Physics2DDirectSpaceState.xml | 145 - doc/classes/Physics2DServer.xml | 1284 ------- doc/classes/Physics2DServerSW.xml | 15 - doc/classes/Physics2DShapeQueryParameters.xml | 50 - doc/classes/Physics2DShapeQueryResult.xml | 58 - doc/classes/Physics2DTestMotionResult.xml | 33 - doc/classes/PhysicsBody.xml | 91 - doc/classes/PhysicsBody3D.xml | 91 + doc/classes/PhysicsDirectBodyState.xml | 223 -- doc/classes/PhysicsDirectBodyState2D.xml | 218 ++ doc/classes/PhysicsDirectBodyState2DSW.xml | 15 + doc/classes/PhysicsDirectBodyState3D.xml | 223 ++ doc/classes/PhysicsDirectSpaceState.xml | 98 - doc/classes/PhysicsDirectSpaceState2D.xml | 145 + doc/classes/PhysicsDirectSpaceState3D.xml | 98 + doc/classes/PhysicsMaterial.xml | 2 +- doc/classes/PhysicsServer.xml | 1639 --------- doc/classes/PhysicsServer2D.xml | 1284 +++++++ doc/classes/PhysicsServer2DSW.xml | 15 + doc/classes/PhysicsServer3D.xml | 1639 +++++++++ doc/classes/PhysicsShapeQueryParameters.xml | 47 - doc/classes/PhysicsShapeQueryParameters2D.xml | 50 + doc/classes/PhysicsShapeQueryParameters3D.xml | 47 + doc/classes/PhysicsShapeQueryResult.xml | 58 - doc/classes/PhysicsShapeQueryResult2D.xml | 58 + doc/classes/PhysicsShapeQueryResult3D.xml | 58 + doc/classes/PhysicsTestMotionResult2D.xml | 33 + doc/classes/PinJoint.xml | 55 - doc/classes/PinJoint2D.xml | 4 +- doc/classes/PinJoint3D.xml | 55 + doc/classes/Position3D.xml | 4 +- doc/classes/ProceduralSkyMaterial.xml | 4 +- doc/classes/ProjectSettings.xml | 18 +- doc/classes/ProximityGroup.xml | 47 - doc/classes/ProximityGroup3D.xml | 47 + doc/classes/RID.xml | 2 +- doc/classes/RayCast.xml | 150 - doc/classes/RayCast3D.xml | 150 + doc/classes/RayShape.xml | 23 - doc/classes/RayShape3D.xml | 23 + doc/classes/ReflectionProbe.xml | 4 +- doc/classes/RemoteTransform.xml | 40 - doc/classes/RemoteTransform3D.xml | 40 + doc/classes/RenderingServer.xml | 3737 ++++++++++++++++++++ doc/classes/RigidBody.xml | 253 -- doc/classes/RigidBody2D.xml | 6 +- doc/classes/RigidBody3D.xml | 253 ++ doc/classes/RootMotionView.xml | 2 +- doc/classes/Shape.xml | 21 - doc/classes/Shape3D.xml | 21 + doc/classes/Skeleton.xml | 269 -- doc/classes/Skeleton3D.xml | 275 ++ doc/classes/SkeletonIK.xml | 61 - doc/classes/SkeletonIK3D.xml | 61 + doc/classes/SliderJoint.xml | 173 - doc/classes/SliderJoint3D.xml | 173 + doc/classes/SoftBody.xml | 117 - doc/classes/SoftBody3D.xml | 117 + doc/classes/Spatial.xml | 350 -- doc/classes/SpatialGizmo.xml | 13 - doc/classes/SpatialVelocityTracker.xml | 39 - doc/classes/SphereShape.xml | 20 - doc/classes/SphereShape3D.xml | 20 + doc/classes/SpotLight.xml | 30 - doc/classes/SpotLight3D.xml | 30 + doc/classes/SpringArm.xml | 68 - doc/classes/SpringArm3D.xml | 68 + doc/classes/Sprite.xml | 100 - doc/classes/Sprite2D.xml | 100 + doc/classes/Sprite3D.xml | 2 +- doc/classes/SpriteBase3D.xml | 4 +- doc/classes/SpriteFrames.xml | 4 +- doc/classes/StaticBody.xml | 28 - doc/classes/StaticBody3D.xml | 28 + doc/classes/Texture2D.xml | 20 +- doc/classes/VehicleBody.xml | 31 - doc/classes/VehicleBody3D.xml | 31 + doc/classes/VehicleWheel.xml | 83 - doc/classes/VehicleWheel3D.xml | 83 + doc/classes/VelocityTracker3D.xml | 39 + doc/classes/Viewport.xml | 16 +- doc/classes/VisibilityEnabler.xml | 53 - doc/classes/VisibilityEnabler2D.xml | 8 +- doc/classes/VisibilityEnabler3D.xml | 53 + doc/classes/VisibilityNotifier.xml | 54 - doc/classes/VisibilityNotifier3D.xml | 54 + doc/classes/VisualInstance.xml | 79 - doc/classes/VisualInstance3D.xml | 79 + doc/classes/VisualServer.xml | 3737 -------------------- doc/classes/World.xml | 35 - doc/classes/World2D.xml | 6 +- doc/classes/World3D.xml | 35 + doc/classes/WorldEnvironment.xml | 2 +- doc/classes/WorldMarginShape.xml | 20 - doc/classes/WorldMarginShape3D.xml | 20 + editor/doc_data.cpp | 2 +- editor/icons/GizmoCPUParticles.svg | 1 - editor/icons/GizmoCPUParticles3D.svg | 1 + editor/icons/GizmoGPUParticles3D.svg | 1 + editor/icons/GizmoParticles.svg | 1 - editor/import/editor_import_collada.cpp | 2 +- editor/import/resource_importer_scene.cpp | 2 +- editor/node_3d_editor_gizmos.cpp | 54 +- editor/node_3d_editor_gizmos.h | 12 +- editor/plugins/camera_3d_editor_plugin.cpp | 2 +- editor/plugins/cpu_particles_3d_editor_plugin.h | 2 +- editor/plugins/gpu_particles_2d_editor_plugin.h | 2 +- editor/plugins/gpu_particles_3d_editor_plugin.h | 2 +- editor/plugins/mesh_instance_3d_editor_plugin.cpp | 10 +- editor/plugins/multimesh_editor_plugin.cpp | 2 +- editor/plugins/node_3d_editor_plugin.cpp | 4 +- editor/plugins/path_3d_editor_plugin.cpp | 2 +- editor/plugins/path_3d_editor_plugin.h | 4 +- editor/plugins/skeleton_ik_3d_editor_plugin.h | 2 +- editor/plugins/sprite_2d_editor_plugin.h | 2 +- modules/bullet/bullet_physics_server.cpp | 8 +- modules/bullet/config.py | 4 +- .../doc_classes/BulletPhysicsDirectBodyState.xml | 13 - .../doc_classes/BulletPhysicsDirectBodyState3D.xml | 13 + modules/bullet/doc_classes/BulletPhysicsServer.xml | 13 - .../bullet/doc_classes/BulletPhysicsServer3D.xml | 13 + modules/bullet/hinge_joint_bullet.cpp | 4 +- modules/bullet/rigid_body_bullet.cpp | 70 +- modules/bullet/rigid_body_bullet.h | 16 +- modules/bullet/space_bullet.cpp | 8 +- modules/csg/config.py | 18 +- modules/csg/doc_classes/CSGBox.xml | 29 - modules/csg/doc_classes/CSGBox3D.xml | 29 + modules/csg/doc_classes/CSGCombiner.xml | 15 - modules/csg/doc_classes/CSGCombiner3D.xml | 15 + modules/csg/doc_classes/CSGCylinder.xml | 35 - modules/csg/doc_classes/CSGCylinder3D.xml | 35 + modules/csg/doc_classes/CSGMesh.xml | 23 - modules/csg/doc_classes/CSGMesh3D.xml | 23 + modules/csg/doc_classes/CSGPolygon.xml | 74 - modules/csg/doc_classes/CSGPolygon3D.xml | 74 + modules/csg/doc_classes/CSGPrimitive.xml | 20 - modules/csg/doc_classes/CSGPrimitive3D.xml | 20 + modules/csg/doc_classes/CSGShape.xml | 100 - modules/csg/doc_classes/CSGShape3D.xml | 100 + modules/csg/doc_classes/CSGSphere.xml | 32 - modules/csg/doc_classes/CSGSphere3D.xml | 32 + modules/csg/doc_classes/CSGTorus.xml | 35 - modules/csg/doc_classes/CSGTorus3D.xml | 35 + modules/csg/register_types.cpp | 9 - modules/gdnavigation/nav_map.cpp | 2 +- modules/gdscript/doc_classes/@GDScript.xml | 2 +- modules/gridmap/doc_classes/GridMap.xml | 2 +- .../GodotSharp/GodotSharp/Core/DynamicObject.cs | 2 +- scene/2d/cpu_particles_2d.cpp | 2 +- scene/2d/gpu_particles_2d.cpp | 2 +- scene/2d/physics_body_2d.cpp | 4 +- scene/3d/collision_object_3d.cpp | 2 +- scene/3d/collision_polygon_3d.cpp | 4 +- scene/3d/collision_shape_3d.cpp | 14 +- scene/3d/cpu_particles_3d.cpp | 4 +- scene/3d/gpu_particles_3d.cpp | 2 +- scene/3d/light_3d.cpp | 4 +- scene/3d/navigation_agent_3d.cpp | 2 +- scene/3d/navigation_obstacle_3d.cpp | 2 +- scene/3d/navigation_region_3d.cpp | 3 +- scene/3d/path_3d.cpp | 4 +- scene/3d/physics_body_3d.cpp | 10 +- scene/3d/physics_body_3d.h | 2 +- scene/3d/soft_body_3d.cpp | 7 +- scene/3d/vehicle_body_3d.cpp | 4 +- scene/register_scene_types.cpp | 16 + scene/resources/world_3d.cpp | 2 +- servers/navigation_server_2d.h | 2 +- servers/physics_3d/physics_server_3d_sw.cpp | 2 +- servers/register_server_types.cpp | 4 +- 298 files changed, 15876 insertions(+), 15895 deletions(-) delete mode 100644 doc/classes/AnimatedSprite.xml create mode 100644 doc/classes/AnimatedSprite2D.xml delete mode 100644 doc/classes/Area.xml create mode 100644 doc/classes/Area3D.xml delete mode 100644 doc/classes/BoneAttachment.xml create mode 100644 doc/classes/BoneAttachment3D.xml delete mode 100644 doc/classes/BoxShape.xml create mode 100644 doc/classes/BoxShape3D.xml delete mode 100644 doc/classes/CPUParticles.xml create mode 100644 doc/classes/CPUParticles3D.xml delete mode 100644 doc/classes/Camera.xml create mode 100644 doc/classes/Camera3D.xml delete mode 100644 doc/classes/CapsuleShape.xml create mode 100644 doc/classes/CapsuleShape3D.xml delete mode 100644 doc/classes/ClippedCamera.xml create mode 100644 doc/classes/ClippedCamera3D.xml delete mode 100644 doc/classes/CollisionObject.xml create mode 100644 doc/classes/CollisionObject3D.xml delete mode 100644 doc/classes/CollisionPolygon.xml create mode 100644 doc/classes/CollisionPolygon3D.xml delete mode 100644 doc/classes/CollisionShape.xml create mode 100644 doc/classes/CollisionShape3D.xml delete mode 100644 doc/classes/ConcavePolygonShape.xml create mode 100644 doc/classes/ConcavePolygonShape3D.xml delete mode 100644 doc/classes/ConeTwistJoint.xml create mode 100644 doc/classes/ConeTwistJoint3D.xml delete mode 100644 doc/classes/ConvexPolygonShape.xml create mode 100644 doc/classes/ConvexPolygonShape3D.xml delete mode 100644 doc/classes/CylinderShape.xml create mode 100644 doc/classes/CylinderShape3D.xml delete mode 100644 doc/classes/DirectionalLight.xml create mode 100644 doc/classes/DirectionalLight3D.xml create mode 100644 doc/classes/EditorNode3DGizmo.xml create mode 100644 doc/classes/EditorNode3DGizmoPlugin.xml delete mode 100644 doc/classes/EditorSpatialGizmo.xml delete mode 100644 doc/classes/EditorSpatialGizmoPlugin.xml create mode 100644 doc/classes/GPUParticles2D.xml create mode 100644 doc/classes/GPUParticles3D.xml delete mode 100644 doc/classes/Generic6DOFJoint.xml create mode 100644 doc/classes/Generic6DOFJoint3D.xml delete mode 100644 doc/classes/GeometryInstance.xml create mode 100644 doc/classes/GeometryInstance3D.xml delete mode 100644 doc/classes/HeightMapShape.xml create mode 100644 doc/classes/HeightMapShape3D.xml delete mode 100644 doc/classes/HingeJoint.xml create mode 100644 doc/classes/HingeJoint3D.xml delete mode 100644 doc/classes/ImmediateGeometry.xml create mode 100644 doc/classes/ImmediateGeometry3D.xml delete mode 100644 doc/classes/Input.xml delete mode 100644 doc/classes/InputDefault.xml create mode 100644 doc/classes/InputEventFromWindow.xml create mode 100644 doc/classes/InputFilter.xml delete mode 100644 doc/classes/InterpolatedCamera.xml delete mode 100644 doc/classes/Joint.xml create mode 100644 doc/classes/Joint3D.xml delete mode 100644 doc/classes/KinematicBody.xml create mode 100644 doc/classes/KinematicBody3D.xml delete mode 100644 doc/classes/KinematicCollision.xml create mode 100644 doc/classes/KinematicCollision3D.xml delete mode 100644 doc/classes/Light.xml create mode 100644 doc/classes/Light3D.xml delete mode 100644 doc/classes/Listener.xml create mode 100644 doc/classes/Listener3D.xml delete mode 100644 doc/classes/MeshInstance.xml create mode 100644 doc/classes/MeshInstance3D.xml delete mode 100644 doc/classes/MultiMeshInstance.xml create mode 100644 doc/classes/MultiMeshInstance3D.xml delete mode 100644 doc/classes/Navigation.xml delete mode 100644 doc/classes/Navigation2DServer.xml create mode 100644 doc/classes/Navigation3D.xml delete mode 100644 doc/classes/NavigationAgent.xml create mode 100644 doc/classes/NavigationAgent3D.xml delete mode 100644 doc/classes/NavigationObstacle.xml create mode 100644 doc/classes/NavigationObstacle3D.xml delete mode 100644 doc/classes/NavigationRegion.xml create mode 100644 doc/classes/NavigationRegion3D.xml delete mode 100644 doc/classes/NavigationServer.xml create mode 100644 doc/classes/NavigationServer2D.xml create mode 100644 doc/classes/NavigationServer3D.xml create mode 100644 doc/classes/Node3D.xml create mode 100644 doc/classes/Node3DGizmo.xml delete mode 100644 doc/classes/OmniLight.xml create mode 100644 doc/classes/OmniLight3D.xml delete mode 100644 doc/classes/Particles.xml delete mode 100644 doc/classes/Particles2D.xml delete mode 100644 doc/classes/Path.xml create mode 100644 doc/classes/Path3D.xml delete mode 100644 doc/classes/PathFollow.xml create mode 100644 doc/classes/PathFollow3D.xml delete mode 100644 doc/classes/PhysicalBone.xml create mode 100644 doc/classes/PhysicalBone3D.xml delete mode 100644 doc/classes/Physics2DDirectBodyState.xml delete mode 100644 doc/classes/Physics2DDirectBodyStateSW.xml delete mode 100644 doc/classes/Physics2DDirectSpaceState.xml delete mode 100644 doc/classes/Physics2DServer.xml delete mode 100644 doc/classes/Physics2DServerSW.xml delete mode 100644 doc/classes/Physics2DShapeQueryParameters.xml delete mode 100644 doc/classes/Physics2DShapeQueryResult.xml delete mode 100644 doc/classes/Physics2DTestMotionResult.xml delete mode 100644 doc/classes/PhysicsBody.xml create mode 100644 doc/classes/PhysicsBody3D.xml delete mode 100644 doc/classes/PhysicsDirectBodyState.xml create mode 100644 doc/classes/PhysicsDirectBodyState2D.xml create mode 100644 doc/classes/PhysicsDirectBodyState2DSW.xml create mode 100644 doc/classes/PhysicsDirectBodyState3D.xml delete mode 100644 doc/classes/PhysicsDirectSpaceState.xml create mode 100644 doc/classes/PhysicsDirectSpaceState2D.xml create mode 100644 doc/classes/PhysicsDirectSpaceState3D.xml delete mode 100644 doc/classes/PhysicsServer.xml create mode 100644 doc/classes/PhysicsServer2D.xml create mode 100644 doc/classes/PhysicsServer2DSW.xml create mode 100644 doc/classes/PhysicsServer3D.xml delete mode 100644 doc/classes/PhysicsShapeQueryParameters.xml create mode 100644 doc/classes/PhysicsShapeQueryParameters2D.xml create mode 100644 doc/classes/PhysicsShapeQueryParameters3D.xml delete mode 100644 doc/classes/PhysicsShapeQueryResult.xml create mode 100644 doc/classes/PhysicsShapeQueryResult2D.xml create mode 100644 doc/classes/PhysicsShapeQueryResult3D.xml create mode 100644 doc/classes/PhysicsTestMotionResult2D.xml delete mode 100644 doc/classes/PinJoint.xml create mode 100644 doc/classes/PinJoint3D.xml delete mode 100644 doc/classes/ProximityGroup.xml create mode 100644 doc/classes/ProximityGroup3D.xml delete mode 100644 doc/classes/RayCast.xml create mode 100644 doc/classes/RayCast3D.xml delete mode 100644 doc/classes/RayShape.xml create mode 100644 doc/classes/RayShape3D.xml delete mode 100644 doc/classes/RemoteTransform.xml create mode 100644 doc/classes/RemoteTransform3D.xml create mode 100644 doc/classes/RenderingServer.xml delete mode 100644 doc/classes/RigidBody.xml create mode 100644 doc/classes/RigidBody3D.xml delete mode 100644 doc/classes/Shape.xml create mode 100644 doc/classes/Shape3D.xml delete mode 100644 doc/classes/Skeleton.xml create mode 100644 doc/classes/Skeleton3D.xml delete mode 100644 doc/classes/SkeletonIK.xml create mode 100644 doc/classes/SkeletonIK3D.xml delete mode 100644 doc/classes/SliderJoint.xml create mode 100644 doc/classes/SliderJoint3D.xml delete mode 100644 doc/classes/SoftBody.xml create mode 100644 doc/classes/SoftBody3D.xml delete mode 100644 doc/classes/Spatial.xml delete mode 100644 doc/classes/SpatialGizmo.xml delete mode 100644 doc/classes/SpatialVelocityTracker.xml delete mode 100644 doc/classes/SphereShape.xml create mode 100644 doc/classes/SphereShape3D.xml delete mode 100644 doc/classes/SpotLight.xml create mode 100644 doc/classes/SpotLight3D.xml delete mode 100644 doc/classes/SpringArm.xml create mode 100644 doc/classes/SpringArm3D.xml delete mode 100644 doc/classes/Sprite.xml create mode 100644 doc/classes/Sprite2D.xml delete mode 100644 doc/classes/StaticBody.xml create mode 100644 doc/classes/StaticBody3D.xml delete mode 100644 doc/classes/VehicleBody.xml create mode 100644 doc/classes/VehicleBody3D.xml delete mode 100644 doc/classes/VehicleWheel.xml create mode 100644 doc/classes/VehicleWheel3D.xml create mode 100644 doc/classes/VelocityTracker3D.xml delete mode 100644 doc/classes/VisibilityEnabler.xml create mode 100644 doc/classes/VisibilityEnabler3D.xml delete mode 100644 doc/classes/VisibilityNotifier.xml create mode 100644 doc/classes/VisibilityNotifier3D.xml delete mode 100644 doc/classes/VisualInstance.xml create mode 100644 doc/classes/VisualInstance3D.xml delete mode 100644 doc/classes/VisualServer.xml delete mode 100644 doc/classes/World.xml create mode 100644 doc/classes/World3D.xml delete mode 100644 doc/classes/WorldMarginShape.xml create mode 100644 doc/classes/WorldMarginShape3D.xml delete mode 100644 editor/icons/GizmoCPUParticles.svg create mode 100644 editor/icons/GizmoCPUParticles3D.svg create mode 100644 editor/icons/GizmoGPUParticles3D.svg delete mode 100644 editor/icons/GizmoParticles.svg delete mode 100644 modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml create mode 100644 modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml delete mode 100644 modules/bullet/doc_classes/BulletPhysicsServer.xml create mode 100644 modules/bullet/doc_classes/BulletPhysicsServer3D.xml delete mode 100644 modules/csg/doc_classes/CSGBox.xml create mode 100644 modules/csg/doc_classes/CSGBox3D.xml delete mode 100644 modules/csg/doc_classes/CSGCombiner.xml create mode 100644 modules/csg/doc_classes/CSGCombiner3D.xml delete mode 100644 modules/csg/doc_classes/CSGCylinder.xml create mode 100644 modules/csg/doc_classes/CSGCylinder3D.xml delete mode 100644 modules/csg/doc_classes/CSGMesh.xml create mode 100644 modules/csg/doc_classes/CSGMesh3D.xml delete mode 100644 modules/csg/doc_classes/CSGPolygon.xml create mode 100644 modules/csg/doc_classes/CSGPolygon3D.xml delete mode 100644 modules/csg/doc_classes/CSGPrimitive.xml create mode 100644 modules/csg/doc_classes/CSGPrimitive3D.xml delete mode 100644 modules/csg/doc_classes/CSGShape.xml create mode 100644 modules/csg/doc_classes/CSGShape3D.xml delete mode 100644 modules/csg/doc_classes/CSGSphere.xml create mode 100644 modules/csg/doc_classes/CSGSphere3D.xml delete mode 100644 modules/csg/doc_classes/CSGTorus.xml create mode 100644 modules/csg/doc_classes/CSGTorus3D.xml diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 74c364bad5..8c6821eaac 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -36,8 +36,8 @@ The [IP] singleton. - - The [Input] singleton. + + The [InputFilter] singleton. The [InputMap] singleton. @@ -56,14 +56,14 @@ The [Marshalls] singleton. - - The [Navigation2DServer] singleton. - The [NavigationMeshGenerator] singleton. - - The [NavigationServer] singleton. + + The [NavigationServer2D] singleton. + + + The [NavigationServer2D] singleton. The [OS] singleton. @@ -71,15 +71,18 @@ The [Performance] singleton. - - The [Physics2DServer] singleton. + + The [PhysicsServer2D] singleton. - - The [PhysicsServer] singleton. + + The [PhysicsServer3D] singleton. The [ProjectSettings] singleton. + + The [RenderingServer] singleton. + The [ResourceLoader] singleton. @@ -92,9 +95,6 @@ The [VisualScriptEditor] singleton. - - The [VisualServer] singleton. - diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml index 87181f572d..82575ce7cb 100644 --- a/doc/classes/ARVRAnchor.xml +++ b/doc/classes/ARVRAnchor.xml @@ -1,5 +1,5 @@ - + An anchor point in AR space. diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml index a571d26c83..c97d5cf1d8 100644 --- a/doc/classes/ARVRCamera.xml +++ b/doc/classes/ARVRCamera.xml @@ -1,5 +1,5 @@ - + A camera node with a few overrules for AR/VR applied, such as location tracking. diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index ebae25feb7..572b47ce6d 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -1,5 +1,5 @@ - + A spatial node representing a spatially-tracked controller. diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml index 9a386fd154..a88a89c927 100644 --- a/doc/classes/ARVROrigin.xml +++ b/doc/classes/ARVROrigin.xml @@ -1,5 +1,5 @@ - + The origin point in AR/VR. diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 6db7121858..d8d069c048 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -69,7 +69,7 @@ - Returns the absolute timestamp (in μs) of the last [ARVRServer] commit of the AR/VR eyes to [VisualServer]. The value comes from an internal call to [method OS.get_ticks_usec]. + Returns the absolute timestamp (in μs) of the last [ARVRServer] commit of the AR/VR eyes to [RenderingServer]. The value comes from an internal call to [method OS.get_ticks_usec]. diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml deleted file mode 100644 index b5c1d38ff9..0000000000 --- a/doc/classes/AnimatedSprite.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - Sprite node that can use multiple textures for animation. - - - Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. - - - - - - - - - Returns [code]true[/code] if an animation is currently being played. - - - - - - - - - - - Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse. - - - - - - - Stops the current animation (does not reset the frame counter). - - - - - - The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. - - - If [code]true[/code], texture will be centered. - - - If [code]true[/code], texture is flipped horizontally. - - - If [code]true[/code], texture is flipped vertically. - - - The displayed animation frame's index. - - - The [SpriteFrames] resource containing the animation(s). - - - The texture's drawing offset. - - - If [code]true[/code], the [member animation] is currently playing. - - - Strength of the specular light effect of this [AnimatedSprite]. - - - The color of the specular light effect. - - - The animation speed is multiplied by this value. - - - - - - Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. - - - - - Emitted when [member frame] changed. - - - - - - diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml new file mode 100644 index 0000000000..8d0534ccd2 --- /dev/null +++ b/doc/classes/AnimatedSprite2D.xml @@ -0,0 +1,87 @@ + + + + Sprite node that can use multiple textures for animation. + + + Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. + + + + + + + + + Returns [code]true[/code] if an animation is currently being played. + + + + + + + + + + + Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse. + + + + + + + Stops the current animation (does not reset the frame counter). + + + + + + The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset. + + + If [code]true[/code], texture will be centered. + + + If [code]true[/code], texture is flipped horizontally. + + + If [code]true[/code], texture is flipped vertically. + + + The displayed animation frame's index. + + + The [SpriteFrames] resource containing the animation(s). + + + The texture's drawing offset. + + + If [code]true[/code], the [member animation] is currently playing. + + + Strength of the specular light effect of this [AnimatedSprite2D]. + + + The color of the specular light effect. + + + The animation speed is multiplied by this value. + + + + + + Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + + + + + Emitted when [member frame] changed. + + + + + + diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index b851c76e59..80b910aaa7 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -4,7 +4,7 @@ Proxy texture for simple frame-based animations. - [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet]. + [AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite2D], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet]. The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. [AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. Also, it doesn't support [AtlasTexture]. Each frame needs to be separate image. @@ -71,7 +71,7 @@ - The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite]. + The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D]. diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml deleted file mode 100644 index b273a7a9d9..0000000000 --- a/doc/classes/Area.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - General-purpose area node for detection and 3D physics influence. - - - 3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). - - - - - - - - - - - Returns an individual bit on the layer mask. - - - - - - - - - Returns an individual bit on the collision mask. - - - - - - - Returns a list of intersecting [Area]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. - - - - - - - Returns a list of intersecting [PhysicsBody]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. - - - - - - - - - If [code]true[/code], the given area overlaps the Area. - [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. - - - - - - - - - If [code]true[/code], the given physics body overlaps the Area. - [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). - - - - - - - - - - - Set/clear individual bits on the layer mask. This simplifies editing this [Area]'s layers. - - - - - - - - - - - Set/clear individual bits on the collision mask. This simplifies editing which [Area] layers this [Area] scans. - - - - - - The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). - - - The name of the area's audio bus. - - - If [code]true[/code], the area's audio bus overrides the default audio bus. - - - The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. - - - The physics layers this area scans to determine collision detection. - - - The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. - - - The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. - - - If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]. - - - The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. - - - The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). - - - If [code]true[/code], other monitoring areas can detect this area. - - - If [code]true[/code], the area detects bodies or areas entering and exiting it. - - - The area's priority. Higher priority areas are processed first. - - - The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. - - - If [code]true[/code], the area applies reverb to its associated audio. - - - The reverb bus name to use for this area's associated audio. - - - The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. - - - Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values. - - - - - - - - Emitted when another area enters. - - - - - - - Emitted when another area exits. - - - - - - - - - - - - - Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. - - - - - - - - - - - - - Emitted when another area exits, reporting which areas were overlapping. - - - - - - - Emitted when a physics body enters. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). - - - - - - - Emitted when a physics body exits. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). - - - - - - - - - - - - - Emitted when a physics body enters, reporting which shapes overlapped. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). - - - - - - - - - - - - - Emitted when a physics body exits, reporting which shapes were overlapping. - The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). - - - - - - This area does not affect gravity/damping. - - - This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order). - - - This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas. - - - This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. - - - This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas. - - - diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml new file mode 100644 index 0000000000..1adfc878e2 --- /dev/null +++ b/doc/classes/Area3D.xml @@ -0,0 +1,247 @@ + + + + General-purpose area node for detection and 3D physics influence. + + + 3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). + + + + + + + + + + + Returns an individual bit on the layer mask. + + + + + + + + + Returns an individual bit on the collision mask. + + + + + + + Returns a list of intersecting [Area3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + + + + + + + Returns a list of intersecting [PhysicsBody3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + + + + + + + + + If [code]true[/code], the given area overlaps the Area3D. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + + + + + + + + + If [code]true[/code], the given physics body overlaps the Area3D. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + + + + + + + + + + + Set/clear individual bits on the layer mask. This simplifies editing this [Area3D]'s layers. + + + + + + + + + + + Set/clear individual bits on the collision mask. This simplifies editing which [Area3D] layers this [Area3D] scans. + + + + + + The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). + + + The name of the area's audio bus. + + + If [code]true[/code], the area's audio bus overrides the default audio bus. + + + The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. + + + The physics layers this area scans to determine collision detection. + + + The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. + + + The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. + + + If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]. + + + The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. + + + The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). + + + If [code]true[/code], other monitoring areas can detect this area. + + + If [code]true[/code], the area detects bodies or areas entering and exiting it. + + + The area's priority. Higher priority areas are processed first. + + + The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. + + + If [code]true[/code], the area applies reverb to its associated audio. + + + The reverb bus name to use for this area's associated audio. + + + The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. + + + Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values. + + + + + + + + Emitted when another area enters. + + + + + + + Emitted when another area exits. + + + + + + + + + + + + + Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. + + + + + + + + + + + + + Emitted when another area exits, reporting which areas were overlapping. + + + + + + + Emitted when a physics body enters. + The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + + + + + + + Emitted when a physics body exits. + The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + + + + + + + + + + + + + Emitted when a physics body enters, reporting which shapes overlapped. + The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + + + + + + + + + + + + + Emitted when a physics body exits, reporting which shapes were overlapping. + The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + + + + + + This area does not affect gravity/damping. + + + This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order). + + + This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas. + + + This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + + + This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas. + + + diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 47abd2e996..9e742ea581 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -18,10 +18,10 @@ arrays[ArrayMesh.ARRAY_VERTEX] = vertices # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) - var m = MeshInstance.new() + var m = MeshInstance3D.new() m.mesh = arr_mesh [/codeblock] - The [MeshInstance] is ready to be added to the [SceneTree] to be shown. + The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown. https://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 4ec8dba2c6..3eeb524e9c 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -1,5 +1,5 @@ - + Plays 3D sound in 3D space. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 380e739f46..bffaf91e1d 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -634,8 +634,8 @@ The object's X axis will always face the camera. - Used for particle systems when assigned to [Particles] and [CPUParticles] nodes. Enables [code]particles_anim_*[/code] properties. - The [member ParticlesMaterial.anim_speed] or [member CPUParticles.anim_speed] should also be set to a positive value for the animation to play. + Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties. + The [member ParticlesMaterial.anim_speed] or [member CPUParticles3D.anim_speed] should also be set to a positive value for the animation to play. Used to read from the red channel of a texture. diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml deleted file mode 100644 index d15322254b..0000000000 --- a/doc/classes/BoneAttachment.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - A node that will attach to a bone. - - - This node must be the child of a [Skeleton] node. You can then select a bone for this node to attach to. The BoneAttachment node will copy the transform of the selected bone. - - - - - - - - The name of the attached bone. - - - - - diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml new file mode 100644 index 0000000000..ab1e5b17d9 --- /dev/null +++ b/doc/classes/BoneAttachment3D.xml @@ -0,0 +1,20 @@ + + + + A node that will attach to a bone. + + + This node must be the child of a [Skeleton3D] node. You can then select a bone for this node to attach to. The BoneAttachment3D node will copy the transform of the selected bone. + + + + + + + + The name of the attached bone. + + + + + diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml deleted file mode 100644 index 3a5f05ef79..0000000000 --- a/doc/classes/BoxShape.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Box shape resource. - - - 3D box shape that can be a child of a [PhysicsBody] or [Area]. - - - - - - - - The box's half extents. The width, height and depth of this shape is twice the half extents. - - - - - diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml new file mode 100644 index 0000000000..fd08da148d --- /dev/null +++ b/doc/classes/BoxShape3D.xml @@ -0,0 +1,20 @@ + + + + Box shape resource. + + + 3D box shape that can be a child of a [PhysicsBody3D] or [Area3D]. + + + + + + + + The box's half extents. The width, height and depth of this shape is twice the half extents. + + + + + diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml deleted file mode 100644 index 6a6525e99a..0000000000 --- a/doc/classes/CPUParticles.xml +++ /dev/null @@ -1,385 +0,0 @@ - - - - CPU-based 3D particle emitter. - - - CPU-based 3D particle node used to create a variety of particle systems and effects. - See also [Particles], which provides the same functionality with hardware acceleration, but may not run on older devices. - - - - - - - - - - - Sets this node's properties to match a given [Particles] node with an assigned [ParticlesMaterial]. - - - - - - - - - Returns the base value of the parameter specified by [enum Parameter]. - - - - - - - - - Returns the [Curve] of the parameter specified by [enum Parameter]. - - - - - - - - - Returns the randomness factor of the parameter specified by [enum Parameter]. - - - - - - - - - Returns the enabled state of the given flag (see [enum Flags] for options). - - - - - - - Restarts the particle emitter. - - - - - - - - - - - Sets the base value of the parameter specified by [enum Parameter]. - - - - - - - - - - - Sets the [Curve] of the parameter specified by [enum Parameter]. - - - - - - - - - - - Sets the randomness factor of the parameter specified by [enum Parameter]. - - - - - - - - - - - Enables or disables the given flag (see [enum Flags] for options). - - - - - - Number of particles emitted in one emission cycle. - - - Initial rotation applied to each particle, in degrees. - - - Each particle's rotation will be animated along this [Curve]. - - - Rotation randomness ratio. - - - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - - - Each particle's angular velocity will vary along this [Curve]. - - - Angular velocity randomness ratio. - - - Particle animation offset. - - - Each particle's animation offset will vary along this [Curve]. - - - Animation offset randomness ratio. - - - Particle animation speed. - - - Each particle's animation speed will vary along this [Curve]. - - - Animation speed randomness ratio. - - - Unused for 3D particles. - - - Unused for 3D particles. - - - The rate at which particles lose velocity. - - - Damping will vary along this [Curve]. - - - Damping randomness ratio. - - - Unit vector specifying the particles' emission direction. - - - Particle draw order. Uses [enum DrawOrder] values. - - - The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. - - - Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. - - - Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. - - - Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. - - - Particles will be emitted inside this region. See [enum EmissionShape] for possible values. - - - The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE]. - - - If [code]true[/code], particles are being emitted. - - - How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. - - - The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. - - - Align Y axis of particle with the direction of its velocity. - - - If [code]true[/code], particles will not move on the z axis. - - - If [code]true[/code], particles rotate around Y axis by [member angle]. - - - Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. - - - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. - - - Gravity applied to every particle. - - - Initial hue variation applied to each particle. - - - Each particle's hue will vary along this [Curve]. - - - Hue variation randomness ratio. - - - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. - - - Initial velocity randomness ratio. - - - Amount of time each particle will exist. - - - Particle lifetime randomness ratio. - - - Linear acceleration applied to each particle in the direction of motion. - - - Each particle's linear acceleration will vary along this [Curve]. - - - Linear acceleration randomness ratio. - - - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. - - - The [Mesh] used for each particle. If [code]null[/code], particles will be spheres. - - - If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. - - - Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. - This property is only available when [member flag_disable_z] is [code]true[/code]. - - - Each particle's orbital velocity will vary along this [Curve]. - - - Orbital velocity randomness ratio. - - - Particle system starts as if it had already run for this many seconds. - - - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - - - Each particle's radial acceleration will vary along this [Curve]. - - - Radial acceleration randomness ratio. - - - Emission lifetime randomness ratio. - - - Initial scale applied to each particle. - - - Each particle's scale will vary along this [Curve]. - - - Scale randomness ratio. - - - Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. - - - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. - - - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - - - Each particle's tangential acceleration will vary along this [Curve]. - - - Tangential acceleration randomness ratio. - - - - - Particles are drawn in the order emitted. - - - Particles are drawn in order of remaining lifetime. - - - Particles are drawn in order of depth. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. - - - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. - - - Represents the size of the [enum Parameter] enum. - - - Use with [method set_particle_flag] to set [member flag_align_y]. - - - Use with [method set_particle_flag] to set [member flag_rotate_y]. - - - Use with [method set_particle_flag] to set [member flag_disable_z]. - - - Represents the size of the [enum Flags] enum. - - - All particles will be emitted from a single point. - - - Particles will be emitted in the volume of a sphere. - - - Particles will be emitted in the volume of a box. - - - Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]. - - - Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. - - - Represents the size of the [enum EmissionShape] enum. - - - diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 799ba32075..c2b821699d 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -5,7 +5,7 @@ CPU-based 2D particle node used to create a variety of particle systems and effects. - See also [Particles2D], which provides the same functionality with hardware acceleration, but may not run on older devices. + See also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices. https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html @@ -17,7 +17,7 @@ - Sets this node's properties to match a given [Particles2D] node with an assigned [ParticlesMaterial]. + Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial]. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml new file mode 100644 index 0000000000..07da066bd9 --- /dev/null +++ b/doc/classes/CPUParticles3D.xml @@ -0,0 +1,385 @@ + + + + CPU-based 3D particle emitter. + + + CPU-based 3D particle node used to create a variety of particle systems and effects. + See also [GPUParticles3D], which provides the same functionality with hardware acceleration, but may not run on older devices. + + + + + + + + + + + Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial]. + + + + + + + + + Returns the base value of the parameter specified by [enum Parameter]. + + + + + + + + + Returns the [Curve] of the parameter specified by [enum Parameter]. + + + + + + + + + Returns the randomness factor of the parameter specified by [enum Parameter]. + + + + + + + + + Returns the enabled state of the given flag (see [enum Flags] for options). + + + + + + + Restarts the particle emitter. + + + + + + + + + + + Sets the base value of the parameter specified by [enum Parameter]. + + + + + + + + + + + Sets the [Curve] of the parameter specified by [enum Parameter]. + + + + + + + + + + + Sets the randomness factor of the parameter specified by [enum Parameter]. + + + + + + + + + + + Enables or disables the given flag (see [enum Flags] for options). + + + + + + Number of particles emitted in one emission cycle. + + + Initial rotation applied to each particle, in degrees. + + + Each particle's rotation will be animated along this [Curve]. + + + Rotation randomness ratio. + + + Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + + + Each particle's angular velocity will vary along this [Curve]. + + + Angular velocity randomness ratio. + + + Particle animation offset. + + + Each particle's animation offset will vary along this [Curve]. + + + Animation offset randomness ratio. + + + Particle animation speed. + + + Each particle's animation speed will vary along this [Curve]. + + + Animation speed randomness ratio. + + + Unused for 3D particles. + + + Unused for 3D particles. + + + The rate at which particles lose velocity. + + + Damping will vary along this [Curve]. + + + Damping randomness ratio. + + + Unit vector specifying the particles' emission direction. + + + Particle draw order. Uses [enum DrawOrder] values. + + + The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. + + + Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. + + + Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. + + + Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. + + + Particles will be emitted inside this region. See [enum EmissionShape] for possible values. + + + The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE]. + + + If [code]true[/code], particles are being emitted. + + + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. + + + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. + + + Align Y axis of particle with the direction of its velocity. + + + If [code]true[/code], particles will not move on the z axis. + + + If [code]true[/code], particles rotate around Y axis by [member angle]. + + + Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. + + + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. + + + Gravity applied to every particle. + + + Initial hue variation applied to each particle. + + + Each particle's hue will vary along this [Curve]. + + + Hue variation randomness ratio. + + + Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + + + Initial velocity randomness ratio. + + + Amount of time each particle will exist. + + + Particle lifetime randomness ratio. + + + Linear acceleration applied to each particle in the direction of motion. + + + Each particle's linear acceleration will vary along this [Curve]. + + + Linear acceleration randomness ratio. + + + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + + + The [Mesh] used for each particle. If [code]null[/code], particles will be spheres. + + + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. + + + Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. + This property is only available when [member flag_disable_z] is [code]true[/code]. + + + Each particle's orbital velocity will vary along this [Curve]. + + + Orbital velocity randomness ratio. + + + Particle system starts as if it had already run for this many seconds. + + + Radial acceleration applied to each particle. Makes particle accelerate away from origin. + + + Each particle's radial acceleration will vary along this [Curve]. + + + Radial acceleration randomness ratio. + + + Emission lifetime randomness ratio. + + + Initial scale applied to each particle. + + + Each particle's scale will vary along this [Curve]. + + + Scale randomness ratio. + + + Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. + + + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. + + + Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. + + + Each particle's tangential acceleration will vary along this [Curve]. + + + Tangential acceleration randomness ratio. + + + + + Particles are drawn in the order emitted. + + + Particles are drawn in order of remaining lifetime. + + + Particles are drawn in order of depth. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + + + Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + + + Represents the size of the [enum Parameter] enum. + + + Use with [method set_particle_flag] to set [member flag_align_y]. + + + Use with [method set_particle_flag] to set [member flag_rotate_y]. + + + Use with [method set_particle_flag] to set [member flag_disable_z]. + + + Represents the size of the [enum Flags] enum. + + + All particles will be emitted from a single point. + + + Particles will be emitted in the volume of a sphere. + + + Particles will be emitted in the volume of a box. + + + Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]. + + + Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. + + + Represents the size of the [enum EmissionShape] enum. + + + diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml deleted file mode 100644 index 6097721cbd..0000000000 --- a/doc/classes/Camera.xml +++ /dev/null @@ -1,237 +0,0 @@ - - - - Camera node, displays from a point of view. - - - Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. - - - - - - - - - - - If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any. - - - - - - - Returns the camera's RID from the [VisualServer]. - - - - - - - Gets the camera transform. Subclassed cameras such as [InterpolatedCamera] may provide different transforms than the [Node] transform. - - - - - - - - - Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. - - - - - - - Returns the camera's frustum planes in world-space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. - - - - - - - - - Returns [code]true[/code] if the given position is behind the camera. - [b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view. - - - - - - - Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. - - - - - - - - - Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc. - - - - - - - - - - - Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera. - - - - - - - - - Returns a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. - - - - - - - - - Returns a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. - - - - - - - - - - - Enables or disables the given [code]layer[/code] in the [member cull_mask]. - - - - - - - - - - - - - - - Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. - - - - - - - - - - - - - Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. (As a hint, 2D games often use this projection, with values specified in pixels.) - - - - - - - - - - - - - Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. - - - - - - - - - Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in worldspace. - - - - - - The culling mask that describes which 3D render layers are rendered by this camera. - - - If [code]true[/code], the ancestor [Viewport] is currently using this camera. - - - If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. - - - - - The [Environment] to use for this camera. - - - The distance to the far culling boundary for this camera relative to its local Z axis. - - - The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle. - - - The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]. - - - The horizontal (X) offset of the camera viewport. - - - The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT]. - - - The distance to the near culling boundary for this camera relative to its local Z axis. - - - The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size. - - - The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length. - - - The vertical (Y) offset of the camera viewport. - - - - - Perspective projection. Objects on the screen becomes smaller when they are far away. - - - Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. - - - Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects. - - - Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. - - - Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. - - - Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default). - - - Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). - - - Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). - - - diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml new file mode 100644 index 0000000000..bfba23c7ee --- /dev/null +++ b/doc/classes/Camera3D.xml @@ -0,0 +1,237 @@ + + + + Camera node, displays from a point of view. + + + [Camera3D] is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. + + + + + + + + + + + If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any. + + + + + + + Returns the camera's RID from the [RenderingServer]. + + + + + + + Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. + + + + + + + + + Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. + + + + + + + Returns the camera's frustum planes in world-space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. + + + + + + + + + Returns [code]true[/code] if the given position is behind the camera. + [b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view. + + + + + + + Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. + + + + + + + + + Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc. + + + + + + + + + + + Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera. + + + + + + + + + Returns a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + + + + + + + + + Returns a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + + + + + + + + + + + Enables or disables the given [code]layer[/code] in the [member cull_mask]. + + + + + + + + + + + + + + + Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. + + + + + + + + + + + + + Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. (As a hint, 2D games often use this projection, with values specified in pixels.) + + + + + + + + + + + + + Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. + + + + + + + + + Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in worldspace. + + + + + + The culling mask that describes which 3D render layers are rendered by this camera. + + + If [code]true[/code], the ancestor [Viewport] is currently using this camera. + + + If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. + + + + + The [Environment] to use for this camera. + + + The distance to the far culling boundary for this camera relative to its local Z axis. + + + The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle. + + + The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]. + + + The horizontal (X) offset of the camera viewport. + + + The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT]. + + + The distance to the near culling boundary for this camera relative to its local Z axis. + + + The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size. + + + The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length. + + + The vertical (Y) offset of the camera viewport. + + + + + Perspective projection. Objects on the screen becomes smaller when they are far away. + + + Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. + + + Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects. + + + Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. + + + Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. + + + Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default). + + + Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + + + Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + + + diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 73ba8b392f..f2ce2a6fb9 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -426,7 +426,7 @@ - Returns the canvas item RID used by [VisualServer] for this item. + Returns the canvas item RID used by [RenderingServer] for this item. diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index ffe2272260..c2d44c1d17 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -18,7 +18,7 @@ The manner in which material reacts to lighting. - The number of columns in the spritesheet assigned as [Texture2D] for a [Particles2D] or [CPUParticles2D]. + The number of columns in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D]. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. @@ -26,11 +26,11 @@ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. - The number of rows in the spritesheet assigned as [Texture2D] for a [Particles2D] or [CPUParticles2D]. + The number of rows in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D]. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. - If [code]true[/code], enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play. + If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play. This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes. diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml deleted file mode 100644 index c83e832281..0000000000 --- a/doc/classes/CapsuleShape.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Capsule shape for collisions. - - - Capsule shape for collisions. - - - - - - - - The capsule's height. - - - The capsule's radius. - - - - - diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml new file mode 100644 index 0000000000..f56d94dc63 --- /dev/null +++ b/doc/classes/CapsuleShape3D.xml @@ -0,0 +1,23 @@ + + + + Capsule shape for collisions. + + + Capsule shape for collisions. + + + + + + + + The capsule's height. + + + The capsule's radius. + + + + + diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera.xml deleted file mode 100644 index 4cdc098c2f..0000000000 --- a/doc/classes/ClippedCamera.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - A [Camera] that includes collision. - - - This node extends [Camera] to add collisions with [Area] and/or [PhysicsBody] nodes. The camera cannot move through colliding objects. - - - - - - - - - - - Adds a collision exception so the camera does not collide with the specified node. - - - - - - - - - Adds a collision exception so the camera does not collide with the specified [RID]. - - - - - - - Removes all collision exceptions. - - - - - - - Returns the distance the camera has been offset due to a collision. - - - - - - - - - Returns [code]true[/code] if the specified bit index is on. - [b]Note:[/b] Bit indices range from 0-19. - - - - - - - - - Removes a collision exception with the specified node. - - - - - - - - - Removes a collision exception with the specified [RID]. - - - - - - - - - - - Sets the specified bit index to the [code]value[/code]. - [b]Note:[/b] Bit indices range from 0-19. - - - - - - If [code]true[/code], the camera stops on contact with [Area]s. - - - If [code]true[/code], the camera stops on contact with [PhysicsBody]s. - - - The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. - - - The camera's collision margin. The camera can't get closer than this distance to a colliding object. - - - The camera's process callback. See [enum ProcessMode]. - - - - - The camera updates with the [code]_physics_process[/code] callback. - - - The camera updates with the [code]_process[/code] callback. - - - diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml new file mode 100644 index 0000000000..58ecec828d --- /dev/null +++ b/doc/classes/ClippedCamera3D.xml @@ -0,0 +1,110 @@ + + + + A [Camera3D] that includes collision. + + + This node extends [Camera3D] to add collisions with [Area3D] and/or [PhysicsBody3D] nodes. The camera cannot move through colliding objects. + + + + + + + + + + + Adds a collision exception so the camera does not collide with the specified node. + + + + + + + + + Adds a collision exception so the camera does not collide with the specified [RID]. + + + + + + + Removes all collision exceptions. + + + + + + + Returns the distance the camera has been offset due to a collision. + + + + + + + + + Returns [code]true[/code] if the specified bit index is on. + [b]Note:[/b] Bit indices range from 0-19. + + + + + + + + + Removes a collision exception with the specified node. + + + + + + + + + Removes a collision exception with the specified [RID]. + + + + + + + + + + + Sets the specified bit index to the [code]value[/code]. + [b]Note:[/b] Bit indices range from 0-19. + + + + + + If [code]true[/code], the camera stops on contact with [Area3D]s. + + + If [code]true[/code], the camera stops on contact with [PhysicsBody3D]s. + + + The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. + + + The camera's collision margin. The camera can't get closer than this distance to a colliding object. + + + The camera's process callback. See [enum ProcessMode]. + + + + + The camera updates with the [code]_physics_process[/code] callback. + + + The camera updates with the [code]_process[/code] callback. + + + diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml deleted file mode 100644 index 34758d71b2..0000000000 --- a/doc/classes/CollisionObject.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - Base node for collision objects. - - - CollisionObject is the base class for physics objects. It can hold any number of collision [Shape]s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods. - - - - - - - - - - - - - - - - - - - Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events. - - - - - - - - - Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. - - - - - - - Returns the object's [RID]. - - - - - - - Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. - - - - - - - - - If [code]true[/code], the shape owner and its shapes are disabled. - - - - - - - - - Removes the given shape owner. - - - - - - - - - Returns the [code]owner_id[/code] of the given shape. - - - - - - - - - - - Adds a [Shape] to the shape owner. - - - - - - - - - Removes all shapes from the shape owner. - - - - - - - - - Returns the parent object of the given shape owner. - - - - - - - - - - - Returns the [Shape] with the given id from the given shape owner. - - - - - - - - - Returns the number of shapes the given shape owner contains. - - - - - - - - - - - Returns the child index of the [Shape] with the given id from the given shape owner. - - - - - - - - - Returns the shape owner's [Transform]. - - - - - - - - - - - Removes a shape from the given shape owner. - - - - - - - - - - - If [code]true[/code], disables the given shape owner. - - - - - - - - - - - Sets the [Transform] of the given shape owner. - - - - - - If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes. - - - If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s. - - - - - - - - - - - - - - - - Emitted when [method _input_event] receives an event. See its description for details. - - - - - Emitted when the mouse pointer enters any of this object's shapes. - - - - - Emitted when the mouse pointer exits all this object's shapes. - - - - - - diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml new file mode 100644 index 0000000000..f8e897653d --- /dev/null +++ b/doc/classes/CollisionObject3D.xml @@ -0,0 +1,219 @@ + + + + Base node for collision objects. + + + CollisionObject3D is the base class for physics objects. It can hold any number of collision [Shape3D]s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject3D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods. + + + + + + + + + + + + + + + + + + + Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape3D] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events. + + + + + + + + + Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. + + + + + + + Returns the object's [RID]. + + + + + + + Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. + + + + + + + + + If [code]true[/code], the shape owner and its shapes are disabled. + + + + + + + + + Removes the given shape owner. + + + + + + + + + Returns the [code]owner_id[/code] of the given shape. + + + + + + + + + + + Adds a [Shape3D] to the shape owner. + + + + + + + + + Removes all shapes from the shape owner. + + + + + + + + + Returns the parent object of the given shape owner. + + + + + + + + + + + Returns the [Shape3D] with the given id from the given shape owner. + + + + + + + + + Returns the number of shapes the given shape owner contains. + + + + + + + + + + + Returns the child index of the [Shape3D] with the given id from the given shape owner. + + + + + + + + + Returns the shape owner's [Transform]. + + + + + + + + + + + Removes a shape from the given shape owner. + + + + + + + + + + + If [code]true[/code], disables the given shape owner. + + + + + + + + + + + Sets the [Transform] of the given shape owner. + + + + + + If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes. + + + If [code]true[/code], the [CollisionObject3D]'s shapes will respond to [RayCast3D]s. + + + + + + + + + + + + + + + + Emitted when [method _input_event] receives an event. See its description for details. + + + + + Emitted when the mouse pointer enters any of this object's shapes. + + + + + Emitted when the mouse pointer exits all this object's shapes. + + + + + + diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml deleted file mode 100644 index 8aceec17a8..0000000000 --- a/doc/classes/CollisionPolygon.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - Editor-only class for defining a collision polygon in 3D space. - - - Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect. - - - - - - - - Length that the resulting collision extends in either direction perpendicular to its polygon. - - - If [code]true[/code], no collision will be produced. - - - Array of vertices which define the polygon. - [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. - - - - - diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml new file mode 100644 index 0000000000..dd3c57d1d0 --- /dev/null +++ b/doc/classes/CollisionPolygon3D.xml @@ -0,0 +1,27 @@ + + + + Editor-only class for defining a collision polygon in 3D space. + + + Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a [Shape3D] for gameplay. Properties modified during gameplay will have no effect. + + + + + + + + Length that the resulting collision extends in either direction perpendicular to its polygon. + + + If [code]true[/code], no collision will be produced. + + + Array of vertices which define the polygon. + [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. + + + + + diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml deleted file mode 100644 index 7787bf957d..0000000000 --- a/doc/classes/CollisionShape.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - Node that represents collision shape data in 3D space. - - - Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject.shape_owner_get_shape] to get the actual shape. - - - https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html - - - - - - - Sets the collision shape's shape to the addition of all its convexed [MeshInstance] siblings geometry. - - - - - - - - - If this method exists within a script it will be called whenever the shape resource has been modified. - - - - - - A disabled collision shape has no effect in the world. - - - The actual shape owned by this collision shape. - - - - - diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml new file mode 100644 index 0000000000..76515a65a7 --- /dev/null +++ b/doc/classes/CollisionShape3D.xml @@ -0,0 +1,40 @@ + + + + Node that represents collision shape data in 3D space. + + + Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape. + + + https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html + + + + + + + Sets the collision shape's shape to the addition of all its convexed [MeshInstance3D] siblings geometry. + + + + + + + + + If this method exists within a script it will be called whenever the shape resource has been modified. + + + + + + A disabled collision shape has no effect in the world. + + + The actual shape owned by this collision shape. + + + + + diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml deleted file mode 100644 index 47f2276c63..0000000000 --- a/doc/classes/ConcavePolygonShape.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - Concave polygon shape. - - - Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles. - Note: when used for collision, [ConcavePolygonShape] is intended to work with static [PhysicsBody] nodes like [StaticBody] and will not work with [KinematicBody] or [RigidBody] with a mode other than Static. - - - - - - - - - Returns the faces (an array of triangles). - - - - - - - - - Sets the faces (an array of triangles). - - - - - - diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml new file mode 100644 index 0000000000..20402d350a --- /dev/null +++ b/doc/classes/ConcavePolygonShape3D.xml @@ -0,0 +1,32 @@ + + + + Concave polygon shape. + + + Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles. + Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static. + + + + + + + + + Returns the faces (an array of triangles). + + + + + + + + + Sets the faces (an array of triangles). + + + + + + diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml deleted file mode 100644 index 8682391a73..0000000000 --- a/doc/classes/ConeTwistJoint.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - A twist joint between two 3D bodies. - - - The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint]. - The twist axis is initiated as the X axis of the [Joint]. - Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. - - - - - - - - - - - - - - - - - - - - - - - - - - The speed with which the swing or twist will take place. - The higher, the faster. - - - Defines, how fast the swing- and twist-speed-difference on both sides gets synced. - - - The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. - - - Swing is rotation from side to side, around the axis perpendicular to the twist axis. - The swing span defines, how much rotation will not get corrected along the swing axis. - Could be defined as looseness in the [ConeTwistJoint]. - If below 0.05, this behavior is locked. - - - Twist is the rotation around the twist axis, this value defined how far the joint can twist. - Twist is locked if below 0.05. - - - - - Swing is rotation from side to side, around the axis perpendicular to the twist axis. - The swing span defines, how much rotation will not get corrected along the swing axis. - Could be defined as looseness in the [ConeTwistJoint]. - If below 0.05, this behavior is locked. - - - Twist is the rotation around the twist axis, this value defined how far the joint can twist. - Twist is locked if below 0.05. - - - The speed with which the swing or twist will take place. - The higher, the faster. - - - The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. - - - Defines, how fast the swing- and twist-speed-difference on both sides gets synced. - - - Represents the size of the [enum Param] enum. - - - diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml new file mode 100644 index 0000000000..e86e95bec3 --- /dev/null +++ b/doc/classes/ConeTwistJoint3D.xml @@ -0,0 +1,80 @@ + + + + A twist joint between two 3D bodies. + + + The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint3D]. + The twist axis is initiated as the X axis of the [Joint3D]. + Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint3D in the local space of the two Bodies. + + + + + + + + + + + + + + + + + + + + + + + + + + The speed with which the swing or twist will take place. + The higher, the faster. + + + Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + + + The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + + + Swing is rotation from side to side, around the axis perpendicular to the twist axis. + The swing span defines, how much rotation will not get corrected along the swing axis. + Could be defined as looseness in the [ConeTwistJoint3D]. + If below 0.05, this behavior is locked. + + + Twist is the rotation around the twist axis, this value defined how far the joint can twist. + Twist is locked if below 0.05. + + + + + Swing is rotation from side to side, around the axis perpendicular to the twist axis. + The swing span defines, how much rotation will not get corrected along the swing axis. + Could be defined as looseness in the [ConeTwistJoint3D]. + If below 0.05, this behavior is locked. + + + Twist is the rotation around the twist axis, this value defined how far the joint can twist. + Twist is locked if below 0.05. + + + The speed with which the swing or twist will take place. + The higher, the faster. + + + The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + + + Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + + + Represents the size of the [enum Param] enum. + + + diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index a16326d55a..522d484131 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -8,7 +8,7 @@ [codeblock] [section] some_key=42 - string_example="Hello World!" + string_example="Hello World3D!" a_vector=Vector3( 1, 0, 2 ) [/codeblock] The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml deleted file mode 100644 index 077bb57a03..0000000000 --- a/doc/classes/ConvexPolygonShape.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Convex polygon shape for 3D physics. - - - Convex polygon shape resource, which can be added to a [PhysicsBody] or area. - - - - - - - - The list of 3D points forming the convex polygon shape. - - - - - diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml new file mode 100644 index 0000000000..c036f80e2d --- /dev/null +++ b/doc/classes/ConvexPolygonShape3D.xml @@ -0,0 +1,20 @@ + + + + Convex polygon shape for 3D physics. + + + Convex polygon shape resource, which can be added to a [PhysicsBody3D] or area. + + + + + + + + The list of 3D points forming the convex polygon shape. + + + + + diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 5024cdefbd..fe454d90cc 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -4,7 +4,7 @@ Describes a Bézier curve in 3D space. - This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes. + This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a [Path3D], but can be manually sampled for other purposes. It keeps a cache of precalculated points along the curve, to speed up further calculations. @@ -223,7 +223,7 @@ Sets the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. - The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the [PathFollow] calculates. + The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow3D], this tilt is an offset over the natural tilt the [PathFollow3D] calculates. @@ -246,7 +246,7 @@ The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. - If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow.rotation_mode] is set to [constant PathFollow.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. + If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. diff --git a/doc/classes/CylinderShape.xml b/doc/classes/CylinderShape.xml deleted file mode 100644 index 54adbd3b04..0000000000 --- a/doc/classes/CylinderShape.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Cylinder shape for collisions. - - - Cylinder shape for collisions. - - - - - - - - The cylinder's height. - - - The cylinder's radius. - - - - - diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml new file mode 100644 index 0000000000..eb12568e71 --- /dev/null +++ b/doc/classes/CylinderShape3D.xml @@ -0,0 +1,23 @@ + + + + Cylinder shape for collisions. + + + Cylinder shape for collisions. + + + + + + + + The cylinder's height. + + + The cylinder's radius. + + + + + diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml deleted file mode 100644 index a3ef830d5d..0000000000 --- a/doc/classes/DirectionalLight.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - Directional light from a distance, as from the Sun. - - - A directional light is a type of [Light] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction. - - - https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html - - - - - - Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them. - - - If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. - - - Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. - - - - - The maximum distance for shadow splits. - - - The light's shadow rendering algorithm. See [enum ShadowMode]. - - - Can be used to fix special cases of self shadowing when objects are perpendicular to the light. - - - The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. - - - The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. - - - The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code]. - - - - - - Renders the entire scene's shadow map from an orthogonal point of view. May result in blockier shadows on close objects. - - - Splits the view frustum in 2 areas, each with its own shadow map. - - - Splits the view frustum in 4 areas, each with its own shadow map. - - - Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution. - - - Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. - - - diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml new file mode 100644 index 0000000000..a5d476f5c8 --- /dev/null +++ b/doc/classes/DirectionalLight3D.xml @@ -0,0 +1,63 @@ + + + + Directional light from a distance, as from the Sun. + + + A directional light is a type of [Light3D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction. + + + https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html + + + + + + Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them. + + + If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. + + + Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. + + + + + The maximum distance for shadow splits. + + + The light's shadow rendering algorithm. See [enum ShadowMode]. + + + Can be used to fix special cases of self shadowing when objects are perpendicular to the light. + + + The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. + + + The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. + + + The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code]. + + + + + + Renders the entire scene's shadow map from an orthogonal point of view. May result in blockier shadows on close objects. + + + Splits the view frustum in 2 areas, each with its own shadow map. + + + Splits the view frustum in 4 areas, each with its own shadow map. + + + Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution. + + + Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. + + + diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index 75b906d6d2..53db8dd293 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -5,7 +5,7 @@ An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit. - To manage editor feature profiles visually, use [b]Editor > Manage Feature Profiles...[/b] at the top of the editor window. + To manage editor feature profiles visually, use [b]Editor > Manage Feature Profiles...[/b] at the top of the editor window. diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml new file mode 100644 index 0000000000..6d695ddeea --- /dev/null +++ b/doc/classes/EditorNode3DGizmo.xml @@ -0,0 +1,189 @@ + + + + Custom gizmo for editing Node3D objects. + + + Custom gizmo that is used for providing custom visualization and editing (handles) for Node3D objects. See [EditorNode3DGizmoPlugin] for more information. + + + + + + + + + + + + + + + + + + + Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. + + + + + + + + + + + + + + + Adds a list of handles (points) which can be used to deform the object being edited. + There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw]. + + + + + + + + + + + + + + + Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds an unscaled billboard for visualization. Call this function during [method redraw]. + + + + + + + + + + + + + + + + + + + Commit a handle being edited (handles must have been previously added by [method add_handles]). + If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided. + + + + + + + + + Gets the name of an edited handle (handles must have been previously added by [method add_handles]). + Handles can be named for reference to the user when editing. + + + + + + + + + Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]. + + + + + + + Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material]. + + + + + + + Returns the Node3D node associated with this gizmo. + + + + + + + + + Gets whether a handle is highlighted or not. + + + + + + + This function is called when the Node3D this gizmo refers to changes (the [method Node3D.update_gizmo] is called). + + + + + + + + + + + + + This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates. + The [Camera3D] is also provided so screen coordinates can be converted to raycasts. + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml new file mode 100644 index 0000000000..ca75b47fbf --- /dev/null +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -0,0 +1,198 @@ + + + + Used by the editor to define Node3D gizmo types. + + + EditorNode3DGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorNode3DGizmoPlugin] for the simpler gizmos, or creating a new [EditorNode3DGizmo] type. See the tutorial in the documentation for more info. + + + https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html + + + + + + + + + + + Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. + + + + + + + Override this method to define whether the gizmo can be hidden or not. Returns [code]true[/code] if not overridden. + + + + + + + + + + + + + + + Override this method to commit gizmo handles. Called for this plugin's active gizmos. + + + + + + + + + Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method has_gizmo]. + + + + + + + + + + + Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden. + + + + + + + + + + + + + + + Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden. + + + + + + + + + + + + + + + + + Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden. + + + + + + + + + + + Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. + + + + + + + + + + + Gets actual value of a handle from gizmo. Called for this plugin's active gizmos. + + + + + + + + + + + Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). + + + + + + + Override this method to provide the name that will appear in the gizmo visibility menu. + + + + + + + + + + + + + + + Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos. + + + + + + + + + + + Gets whether a handle is highlighted or not. Called for this plugin's active gizmos. + + + + + + + Override this method to define whether Node3D with this gizmo should be selecteble even when the gizmo is hidden. + + + + + + + + + Callback to redraw the provided gizmo. Called for this plugin's active gizmos. + + + + + + + + + + + + + + + Update the value of a handle after it has been updated. Called for this plugin's active gizmos. + + + + + + diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 587fd51f1e..19583fca28 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -71,7 +71,7 @@ Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. - When given node or resource is selected, the base type will be instanced (e.g. "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. + When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -111,7 +111,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -450,7 +450,7 @@ - + diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml deleted file mode 100644 index b8c4daab07..0000000000 --- a/doc/classes/EditorSpatialGizmo.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - Custom gizmo for editing Spatial objects. - - - Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See [EditorSpatialGizmoPlugin] for more information. - - - - - - - - - - - - - - - - - - - Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. - - - - - - - - - - - - - - - Adds a list of handles (points) which can be used to deform the object being edited. - There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw]. - - - - - - - - - - - - - - - Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds an unscaled billboard for visualization. Call this function during [method redraw]. - - - - - - - - - - - - - - - - - - - Commit a handle being edited (handles must have been previously added by [method add_handles]). - If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided. - - - - - - - - - Gets the name of an edited handle (handles must have been previously added by [method add_handles]). - Handles can be named for reference to the user when editing. - - - - - - - - - Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]. - - - - - - - Returns the [EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorSpatialGizmoPlugin.get_material]. - - - - - - - Returns the Spatial node associated with this gizmo. - - - - - - - - - Gets whether a handle is highlighted or not. - - - - - - - This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called). - - - - - - - - - - - - - This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates. - The [Camera] is also provided so screen coordinates can be converted to raycasts. - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml deleted file mode 100644 index b1a4a25a5f..0000000000 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - Used by the editor to define Spatial gizmo types. - - - EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorSpatialGizmoPlugin] for the simpler gizmos, or creating a new [EditorSpatialGizmo] type. See the tutorial in the documentation for more info. - - - https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html - - - - - - - - - - - Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. - - - - - - - Override this method to define whether the gizmo can be hidden or not. Returns [code]true[/code] if not overridden. - - - - - - - - - - - - - - - Override this method to commit gizmo handles. Called for this plugin's active gizmos. - - - - - - - - - Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method has_gizmo]. - - - - - - - - - - - Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden. - - - - - - - - - - - - - - - Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_unscaled_billboard]. Should not be overridden. - - - - - - - - - - - - - - - - - Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method EditorSpatialGizmo.add_lines]. Should not be overridden. - - - - - - - - - - - Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. - - - - - - - - - - - Gets actual value of a handle from gizmo. Called for this plugin's active gizmos. - - - - - - - - - - - Gets material from the internal list of materials. If an [EditorSpatialGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). - - - - - - - Override this method to provide the name that will appear in the gizmo visibility menu. - - - - - - - - - - - - - - - Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a [Spatial] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorSpatialGizmo] assigned and is added to this plugin's list of active gizmos. - - - - - - - - - - - Gets whether a handle is highlighted or not. Called for this plugin's active gizmos. - - - - - - - Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden. - - - - - - - - - Callback to redraw the provided gizmo. Called for this plugin's active gizmos. - - - - - - - - - - - - - - - Update the value of a handle after it has been updated. Called for this plugin's active gizmos. - - - - - - diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index f5c04b3947..c2e250d491 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -108,7 +108,7 @@ If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). - The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. + The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera3D.far] value. If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog. @@ -126,7 +126,7 @@ The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top. - The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene. + The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight3D node in the scene. The depth fog's [Color] when looking towards the sun. diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 322143ea9e..df50244c77 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -1,5 +1,5 @@ - + Real-time global illumination (GI) probe. @@ -19,7 +19,7 @@ - Bakes the effect from all [GeometryInstance]s marked with [member GeometryInstance.use_in_baked_light] and [Light]s marked with either [constant Light.BAKE_INDIRECT] or [constant Light.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. + Bakes the effect from all [GeometryInstance3D]s marked with [member GeometryInstance3D.use_in_baked_light] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml new file mode 100644 index 0000000000..64a2522f2f --- /dev/null +++ b/doc/classes/GPUParticles2D.xml @@ -0,0 +1,87 @@ + + + + 2D particle emitter. + + + 2D particle node used to create a variety of particle systems and effects. [GPUParticles2D] features an emitter that generates some number of particles at a given rate. + Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. + + + https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html + + + + + + + Returns a rectangle containing the positions of all existing particles. + + + + + + + Restarts all the existing particles. + + + + + + Number of particles emitted in one emission cycle. + + + Particle draw order. Uses [enum DrawOrder] values. + + + If [code]true[/code], particles are being emitted. + + + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. + + + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. + + + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. + + + Amount of time each particle will exist. + + + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + + + Normal map to be used for the [member texture] property. + + + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. + + + Particle system starts as if it had already run for this many seconds. + + + [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. + + + Emission lifetime randomness ratio. + + + Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. + + + Particle texture. If [code]null[/code], particles will be squares. + + + Editor visibility helper. + + + + + Particles are drawn in the order emitted. + + + Particles are drawn in order of remaining lifetime. + + + diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml new file mode 100644 index 0000000000..add8f28bf8 --- /dev/null +++ b/doc/classes/GPUParticles3D.xml @@ -0,0 +1,122 @@ + + + + 3D particle emitter. + + + 3D particle node used to create a variety of particle systems and effects. [GPUParticles3D] features an emitter that generates some number of particles at a given rate. + Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. + + + https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html + + + + + + + Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. + + + + + + + + + Returns the [Mesh] that is drawn at index [code]pass[/code]. + + + + + + + Restarts the particle emission, clearing existing particles. + + + + + + + + + + + Sets the [Mesh] that is drawn at index [code]pass[/code]. + + + + + + Number of particles to emit. + + + Particle draw order. Uses [enum DrawOrder] values. + + + [Mesh] that is drawn for the first draw pass. + + + [Mesh] that is drawn for the second draw pass. + + + [Mesh] that is drawn for the third draw pass. + + + [Mesh] that is drawn for the fourth draw pass. + + + The number of draw passes when rendering particles. + + + If [code]true[/code], particles are being emitted. + + + Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously. + + + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. + + + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. + + + Amount of time each particle will exist. + + + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. + + + If [code]true[/code], only [code]amount[/code] particles will be emitted. + + + Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. + + + [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. + + + Emission randomness ratio. + + + Speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. + + + The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active. + + + + + Particles are drawn in the order emitted. + + + Particles are drawn in order of remaining lifetime. + + + Particles are drawn in order of depth. + + + Maximum number of draw passes supported. + + + diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml deleted file mode 100644 index 29ebf9f5d6..0000000000 --- a/doc/classes/Generic6DOFJoint.xml +++ /dev/null @@ -1,426 +0,0 @@ - - - - The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. - - - The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The amount of rotational damping across the X axis. - The lower, the longer an impulse from one side takes to travel to the other side. - - - If [code]true[/code], rotation across the X axis is limited. - - - When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - - - The maximum amount of force that can occur, when rotating around the X axis. - - - The minimum rotation in negative direction to break loose and rotate around the X axis. - - - The amount of rotational restitution across the X axis. The lower, the more restitution occurs. - - - The speed of all rotations across the X axis. - - - The minimum rotation in positive direction to break loose and rotate around the X axis. - - - The amount of rotational damping across the Y axis. The lower, the more dampening occurs. - - - If [code]true[/code], rotation across the Y axis is limited. - - - When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - - - The maximum amount of force that can occur, when rotating around the Y axis. - - - The minimum rotation in negative direction to break loose and rotate around the Y axis. - - - The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. - - - The speed of all rotations across the Y axis. - - - The minimum rotation in positive direction to break loose and rotate around the Y axis. - - - The amount of rotational damping across the Z axis. The lower, the more dampening occurs. - - - If [code]true[/code], rotation across the Z axis is limited. - - - When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - - - The maximum amount of force that can occur, when rotating around the Z axis. - - - The minimum rotation in negative direction to break loose and rotate around the Z axis. - - - The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. - - - The speed of all rotations across the Z axis. - - - The minimum rotation in positive direction to break loose and rotate around the Z axis. - - - If [code]true[/code], a rotating motor at the X axis is enabled. - - - Maximum acceleration for the motor at the X axis. - - - Target speed for the motor at the X axis. - - - If [code]true[/code], a rotating motor at the Y axis is enabled. - - - Maximum acceleration for the motor at the Y axis. - - - Target speed for the motor at the Y axis. - - - If [code]true[/code], a rotating motor at the Z axis is enabled. - - - Maximum acceleration for the motor at the Z axis. - - - Target speed for the motor at the Z axis. - - - - - - - - - - - - - - - - - - - - - - - - - - - The amount of damping that happens at the X motion. - - - If [code]true[/code], the linear motion across the X axis is limited. - - - The minimum difference between the pivot points' X axis. - - - The amount of restitution on the X axis movement. The lower, the more momentum gets lost. - - - A factor applied to the movement across the X axis. The lower, the slower the movement. - - - The maximum difference between the pivot points' X axis. - - - The amount of damping that happens at the Y motion. - - - If [code]true[/code], the linear motion across the Y axis is limited. - - - The minimum difference between the pivot points' Y axis. - - - The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. - - - A factor applied to the movement across the Y axis. The lower, the slower the movement. - - - The maximum difference between the pivot points' Y axis. - - - The amount of damping that happens at the Z motion. - - - If [code]true[/code], the linear motion across the Z axis is limited. - - - The minimum difference between the pivot points' Z axis. - - - The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. - - - A factor applied to the movement across the Z axis. The lower, the slower the movement. - - - The maximum difference between the pivot points' Z axis. - - - If [code]true[/code], then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits. - - - The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. - - - The speed that the linear motor will attempt to reach on the X axis. - - - If [code]true[/code], then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits. - - - The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. - - - The speed that the linear motor will attempt to reach on the Y axis. - - - If [code]true[/code], then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits. - - - The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. - - - The speed that the linear motor will attempt to reach on the Z axis. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The minimum difference between the pivot points' axes. - - - The maximum difference between the pivot points' axes. - - - A factor applied to the movement across the axes. The lower, the slower the movement. - - - The amount of restitution on the axes' movement. The lower, the more momentum gets lost. - - - The amount of damping that happens at the linear motion across the axes. - - - The velocity the linear motor will try to reach. - - - The maximum force the linear motor will apply while trying to reach the velocity target. - - - The minimum rotation in negative direction to break loose and rotate around the axes. - - - The minimum rotation in positive direction to break loose and rotate around the axes. - - - The speed of all rotations across the axes. - - - The amount of rotational damping across the axes. The lower, the more dampening occurs. - - - The amount of rotational restitution across the axes. The lower, the more restitution occurs. - - - The maximum amount of force that can occur, when rotating around the axes. - - - When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - - - Target speed for the motor at the axes. - - - Maximum acceleration for the motor at the axes. - - - Represents the size of the [enum Param] enum. - - - If enabled, linear motion is possible within the given limits. - - - If enabled, rotational motion is possible within the given limits. - - - - - - - If enabled, there is a rotational motor across these axes. - - - If enabled, there is a linear motor across these axes. - - - Represents the size of the [enum Flag] enum. - - - diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml new file mode 100644 index 0000000000..fae567dc58 --- /dev/null +++ b/doc/classes/Generic6DOFJoint3D.xml @@ -0,0 +1,426 @@ + + + + The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. + + + The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The amount of rotational damping across the X axis. + The lower, the longer an impulse from one side takes to travel to the other side. + + + If [code]true[/code], rotation across the X axis is limited. + + + When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + + + The maximum amount of force that can occur, when rotating around the X axis. + + + The minimum rotation in negative direction to break loose and rotate around the X axis. + + + The amount of rotational restitution across the X axis. The lower, the more restitution occurs. + + + The speed of all rotations across the X axis. + + + The minimum rotation in positive direction to break loose and rotate around the X axis. + + + The amount of rotational damping across the Y axis. The lower, the more dampening occurs. + + + If [code]true[/code], rotation across the Y axis is limited. + + + When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + + + The maximum amount of force that can occur, when rotating around the Y axis. + + + The minimum rotation in negative direction to break loose and rotate around the Y axis. + + + The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. + + + The speed of all rotations across the Y axis. + + + The minimum rotation in positive direction to break loose and rotate around the Y axis. + + + The amount of rotational damping across the Z axis. The lower, the more dampening occurs. + + + If [code]true[/code], rotation across the Z axis is limited. + + + When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + + + The maximum amount of force that can occur, when rotating around the Z axis. + + + The minimum rotation in negative direction to break loose and rotate around the Z axis. + + + The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. + + + The speed of all rotations across the Z axis. + + + The minimum rotation in positive direction to break loose and rotate around the Z axis. + + + If [code]true[/code], a rotating motor at the X axis is enabled. + + + Maximum acceleration for the motor at the X axis. + + + Target speed for the motor at the X axis. + + + If [code]true[/code], a rotating motor at the Y axis is enabled. + + + Maximum acceleration for the motor at the Y axis. + + + Target speed for the motor at the Y axis. + + + If [code]true[/code], a rotating motor at the Z axis is enabled. + + + Maximum acceleration for the motor at the Z axis. + + + Target speed for the motor at the Z axis. + + + + + + + + + + + + + + + + + + + + + + + + + + + The amount of damping that happens at the X motion. + + + If [code]true[/code], the linear motion across the X axis is limited. + + + The minimum difference between the pivot points' X axis. + + + The amount of restitution on the X axis movement. The lower, the more momentum gets lost. + + + A factor applied to the movement across the X axis. The lower, the slower the movement. + + + The maximum difference between the pivot points' X axis. + + + The amount of damping that happens at the Y motion. + + + If [code]true[/code], the linear motion across the Y axis is limited. + + + The minimum difference between the pivot points' Y axis. + + + The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. + + + A factor applied to the movement across the Y axis. The lower, the slower the movement. + + + The maximum difference between the pivot points' Y axis. + + + The amount of damping that happens at the Z motion. + + + If [code]true[/code], the linear motion across the Z axis is limited. + + + The minimum difference between the pivot points' Z axis. + + + The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. + + + A factor applied to the movement across the Z axis. The lower, the slower the movement. + + + The maximum difference between the pivot points' Z axis. + + + If [code]true[/code], then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits. + + + The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. + + + The speed that the linear motor will attempt to reach on the X axis. + + + If [code]true[/code], then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits. + + + The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. + + + The speed that the linear motor will attempt to reach on the Y axis. + + + If [code]true[/code], then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits. + + + The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. + + + The speed that the linear motor will attempt to reach on the Z axis. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The minimum difference between the pivot points' axes. + + + The maximum difference between the pivot points' axes. + + + A factor applied to the movement across the axes. The lower, the slower the movement. + + + The amount of restitution on the axes' movement. The lower, the more momentum gets lost. + + + The amount of damping that happens at the linear motion across the axes. + + + The velocity the linear motor will try to reach. + + + The maximum force the linear motor will apply while trying to reach the velocity target. + + + The minimum rotation in negative direction to break loose and rotate around the axes. + + + The minimum rotation in positive direction to break loose and rotate around the axes. + + + The speed of all rotations across the axes. + + + The amount of rotational damping across the axes. The lower, the more dampening occurs. + + + The amount of rotational restitution across the axes. The lower, the more restitution occurs. + + + The maximum amount of force that can occur, when rotating around the axes. + + + When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + + + Target speed for the motor at the axes. + + + Maximum acceleration for the motor at the axes. + + + Represents the size of the [enum Param] enum. + + + If enabled, linear motion is possible within the given limits. + + + If enabled, rotational motion is possible within the given limits. + + + + + + + If enabled, there is a rotational motor across these axes. + + + If enabled, there is a linear motor across these axes. + + + Represents the size of the [enum Flag] enum. + + + diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml deleted file mode 100644 index 8259462531..0000000000 --- a/doc/classes/GeometryInstance.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - Base node for geometry-based visual instances. - - - Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. - - - - - - - - - - - Returns the [enum GeometryInstance.Flags] that have been set for this object. - - - - - - - - - Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. - - - - - - - - - - - Sets the [enum GeometryInstance.Flags] specified. See [enum GeometryInstance.Flags] for options. - - - - - - The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values. - - - The extra distance added to the GeometryInstance's bounding box ([AABB]) to increase its cull box. - - - The GeometryInstance's max LOD distance. - [b]Note:[/b] This property currently has no effect. - - - The GeometryInstance's max LOD margin. - [b]Note:[/b] This property currently has no effect. - - - The GeometryInstance's min LOD distance. - [b]Note:[/b] This property currently has no effect. - - - The GeometryInstance's min LOD margin. - [b]Note:[/b] This property currently has no effect. - - - The material override for the whole geometry. - If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. - - - - - If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe]. - - - - - Will not cast any shadows. - - - Will cast shadows from all visible faces in the GeometryInstance. - Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. - - - Will cast shadows from all visible faces in the GeometryInstance. - Will not take culling into account, so all faces will be taken into account when shadow casting. - - - Will only show the shadows casted from this object. - In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. - - - Will allow the GeometryInstance to be used when baking lights using a [GIProbe]. - - - - - Unused in this class, exposed for consistency with [enum VisualServer.InstanceFlags]. - - - Represents the size of the [enum Flags] enum. - - - diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml new file mode 100644 index 0000000000..7df5f0ea50 --- /dev/null +++ b/doc/classes/GeometryInstance3D.xml @@ -0,0 +1,103 @@ + + + + Base node for geometry-based visual instances. + + + Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. + + + + + + + + + + + Returns the [enum GeometryInstance3D.Flags] that have been set for this object. + + + + + + + + + Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. + + + + + + + + + + + Sets the [enum GeometryInstance3D.Flags] specified. See [enum GeometryInstance3D.Flags] for options. + + + + + + The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values. + + + The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box. + + + The GeometryInstance3D's max LOD distance. + [b]Note:[/b] This property currently has no effect. + + + The GeometryInstance3D's max LOD margin. + [b]Note:[/b] This property currently has no effect. + + + The GeometryInstance3D's min LOD distance. + [b]Note:[/b] This property currently has no effect. + + + The GeometryInstance3D's min LOD margin. + [b]Note:[/b] This property currently has no effect. + + + The material override for the whole geometry. + If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. + + + + + If [code]true[/code], this GeometryInstance3D will be used when baking lights using a [GIProbe]. + + + + + Will not cast any shadows. + + + Will cast shadows from all visible faces in the GeometryInstance3D. + Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. + + + Will cast shadows from all visible faces in the GeometryInstance3D. + Will not take culling into account, so all faces will be taken into account when shadow casting. + + + Will only show the shadows casted from this object. + In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. + + + Will allow the GeometryInstance3D to be used when baking lights using a [GIProbe]. + + + + + Unused in this class, exposed for consistency with [enum RenderingServer.InstanceFlags]. + + + Represents the size of the [enum Flags] enum. + + + diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml deleted file mode 100644 index 029f3642d2..0000000000 --- a/doc/classes/HeightMapShape.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - Height map shape for 3D physics (Bullet only). - - - Height map shape resource, which can be added to a [PhysicsBody] or [Area]. - - - - - - - - Height map data, pool array must be of [member map_width] * [member map_depth] size. - - - Depth of the height map data. Changing this will resize the [member map_data]. - - - Width of the height map data. Changing this will resize the [member map_data]. - - - - - diff --git a/doc/classes/HeightMapShape3D.xml b/doc/classes/HeightMapShape3D.xml new file mode 100644 index 0000000000..6d230bdab8 --- /dev/null +++ b/doc/classes/HeightMapShape3D.xml @@ -0,0 +1,26 @@ + + + + Height map shape for 3D physics (Bullet only). + + + Height map shape resource, which can be added to a [PhysicsBody3D] or [Area3D]. + + + + + + + + Height map data, pool array must be of [member map_width] * [member map_depth] size. + + + Depth of the height map data. Changing this will resize the [member map_data]. + + + Width of the height map data. Changing this will resize the [member map_data]. + + + + + diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml deleted file mode 100644 index 0d1b6ff0e0..0000000000 --- a/doc/classes/HingeJoint.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - A hinge between two 3D bodies. - - - A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. - - - - - - - - - - - Returns the value of the specified flag. - - - - - - - - - Returns the value of the specified parameter. - - - - - - - - - - - If [code]true[/code], enables the specified flag. - - - - - - - - - - - Sets the value of the specified parameter. - - - - - - The speed with which the rotation across the axis perpendicular to the hinge gets corrected. - - - If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. - - - The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. - - - The lower this value, the more the rotation gets slowed down. - - - - - The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. - - - When activated, a motor turns the hinge. - - - Maximum acceleration for the motor. - - - Target speed for the motor. - - - The speed with which the two bodies get pulled together when they move in different directions. - - - - - The speed with which the two bodies get pulled together when they move in different directions. - - - The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. - - - The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. - - - The speed with which the rotation across the axis perpendicular to the hinge gets corrected. - - - - - The lower this value, the more the rotation gets slowed down. - - - Target speed for the motor. - - - Maximum acceleration for the motor. - - - Represents the size of the [enum Param] enum. - - - If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. - - - When activated, a motor turns the hinge. - - - Represents the size of the [enum Flag] enum. - - - diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml new file mode 100644 index 0000000000..2d4480cb20 --- /dev/null +++ b/doc/classes/HingeJoint3D.xml @@ -0,0 +1,121 @@ + + + + A hinge between two 3D bodies. + + + A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. + + + + + + + + + + + Returns the value of the specified flag. + + + + + + + + + Returns the value of the specified parameter. + + + + + + + + + + + If [code]true[/code], enables the specified flag. + + + + + + + + + + + Sets the value of the specified parameter. + + + + + + The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + + + If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + + + The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. + + + The lower this value, the more the rotation gets slowed down. + + + + + The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. + + + When activated, a motor turns the hinge. + + + Maximum acceleration for the motor. + + + Target speed for the motor. + + + The speed with which the two bodies get pulled together when they move in different directions. + + + + + The speed with which the two bodies get pulled together when they move in different directions. + + + The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. + + + The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. + + + The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + + + + + The lower this value, the more the rotation gets slowed down. + + + Target speed for the motor. + + + Maximum acceleration for the motor. + + + Represents the size of the [enum Param] enum. + + + If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + + + When activated, a motor turns the hinge. + + + Represents the size of the [enum Flag] enum. + + + diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml deleted file mode 100644 index 710e929d1a..0000000000 --- a/doc/classes/ImmediateGeometry.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - Draws simple geometry from code. - - - Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. - - - - - - - - - - - - - - - - - Simple helper to draw an UV sphere with given latitude, longitude and radius. - - - - - - - - - Adds a vertex in local coordinate space with the currently set color/uv/etc. - - - - - - - - - - - Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. - For the type of primitive, see the [enum Mesh.PrimitiveType] enum. - - - - - - - Clears everything that was drawn using begin/end. - - - - - - - Ends a drawing context and displays the results. - - - - - - - - - The current drawing color. - - - - - - - - - The next vertex's normal. - - - - - - - - - The next vertex's tangent (and binormal facing). - - - - - - - - - The next vertex's UV. - - - - - - - - - The next vertex's second layer UV. - - - - - - diff --git a/doc/classes/ImmediateGeometry3D.xml b/doc/classes/ImmediateGeometry3D.xml new file mode 100644 index 0000000000..1c0831c922 --- /dev/null +++ b/doc/classes/ImmediateGeometry3D.xml @@ -0,0 +1,110 @@ + + + + Draws simple geometry from code. + + + Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. + + + + + + + + + + + + + + + + + Simple helper to draw an UV sphere with given latitude, longitude and radius. + + + + + + + + + Adds a vertex in local coordinate space with the currently set color/uv/etc. + + + + + + + + + + + Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. + For the type of primitive, see the [enum Mesh.PrimitiveType] enum. + + + + + + + Clears everything that was drawn using begin/end. + + + + + + + Ends a drawing context and displays the results. + + + + + + + + + The current drawing color. + + + + + + + + + The next vertex's normal. + + + + + + + + + The next vertex's tangent (and binormal facing). + + + + + + + + + The next vertex's UV. + + + + + + + + + The next vertex's second layer UV. + + + + + + diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml deleted file mode 100644 index 0f212e7498..0000000000 --- a/doc/classes/Input.xml +++ /dev/null @@ -1,477 +0,0 @@ - - - - A singleton that deals with inputs. - - - A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or with the [InputMap] class. - - - https://docs.godotengine.org/en/latest/tutorials/inputs/index.html - - - - - - - - - - - This will simulate pressing the specified action. - The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. - [b]Note:[/b] This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate [code]_input[/code], use [method parse_input_event] instead. - - - - - - - - - If the specified action is already pressed, this will release it. - - - - - - - - - - - Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. - - - - - - - If the device has an accelerometer, this will return the acceleration. Otherwise, it returns an empty [Vector3]. - Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. - - - - - - - - - Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. - - - - - - - Returns an [Array] containing the device IDs of all currently connected joypads. - - - - - - - Returns the currently assigned cursor shape (see [enum CursorShape]). - - - - - - - If the device has an accelerometer, this will return the gravity. Otherwise, it returns an empty [Vector3]. - - - - - - - If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's X, Y, and Z axes. Otherwise, it returns an empty [Vector3]. - - - - - - - - - - - Returns the current value of the joypad axis at given index (see [enum JoystickList]). - - - - - - - - - Returns the index of the provided axis name. - - - - - - - - - Receives a [enum JoystickList] axis and returns its equivalent name as a string. - - - - - - - - - Returns the index of the provided button name. - - - - - - - - - Receives a gamepad button from [enum JoystickList] and returns its equivalent name as a string. - - - - - - - - - Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns [code]"Default Gamepad"[/code] otherwise. - - - - - - - - - Returns the name of the joypad at the specified device index. - - - - - - - - - Returns the duration of the current vibration effect in seconds. - - - - - - - - - Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. - - - - - - - Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. - - - - - - - If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes. - - - - - - - Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. - - - - - - - Returns the mouse mode. See the constants for more information. - - - - - - - - - Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. - This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. - - - - - - - - - Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. - - - - - - - - - Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. - - - - - - - - - - - Returns [code]true[/code] if you are pressing the joypad button (see [enum JoystickList]). - - - - - - - - - Returns [code]true[/code] if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [enum JoystickList]. Unknown joypads are not expected to match these constants, but you can still retrieve events from them. - - - - - - - - - Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant. - - - - - - - - - Returns [code]true[/code] if you are pressing the mouse button specified with [enum ButtonList]. - - - - - - - - - - - - - - - Notifies the [Input] singleton that a connection has changed, to update the state for the [code]device[/code] index. - This is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally. - - - - - - - - - Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. - Example: - [codeblock] - var a = InputEventAction.new() - a.action = "ui_cancel" - a.pressed = true - Input.parse_input_event(a) - [/codeblock] - - - - - - - - - Removes all mappings from the internal database that match the given GUID. - - - - - - - - - - - - - Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. - [code]image[/code]'s size must be lower than 256×256. - [code]hotspot[/code] must be within [code]image[/code]'s size. - [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. - [b]Note:[/b] Only images imported with the [b]Lossless[/b], [b]Lossy[/b] or [b]Uncompressed[/b] compression modes are supported. The [b]Video RAM[/b] compression mode can't be used for custom cursors. - - - - - - - - - Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW]. - [b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. - [b]Note:[/b] This method generates an [InputEventMouseMotion] to update cursor immediately. - - - - - - - - - Sets the mouse mode. See the constants for more information. - - - - - - - - - Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. - Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. - - - - - - - - - - - - - - - Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [code]weak_magnitude[/code] is the strength of the weak motor (between 0 and 1) and [code]strong_magnitude[/code] is the strength of the strong motor (between 0 and 1). [code]duration[/code] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). - [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. - - - - - - - - - Stops the vibration of the joypad. - - - - - - - - - Vibrate Android and iOS devices. - [b]Note:[/b] It needs VIBRATE permission for Android at export settings. iOS does not support duration. - - - - - - - - - Sets the mouse position to the specified vector. - - - - - - - - - - - Emitted when a joypad device has been connected or disconnected. - - - - - - Makes the mouse cursor visible if it is hidden. - - - Makes the mouse cursor hidden if it is visible. - - - Captures the mouse. The mouse will be hidden and unable to leave the game window, but it will still register movement and mouse button presses. On Windows and Linux, the mouse will use raw input mode, which means the reported movement will be unaffected by the OS' mouse acceleration settings. - - - Makes the mouse cursor visible but confines it to the game window. - - - Arrow cursor. Standard, default pointing cursor. - - - I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. - - - Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. - - - Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. - - - Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. - - - Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). - - - Drag cursor. Usually displayed when dragging something. - - - Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. - - - Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. - - - Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. - - - Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. - - - Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. - - - Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. - - - Move cursor. Indicates that something can be moved. - - - Vertical split mouse cursor. On Windows, it's the same as [constant CURSOR_VSIZE]. - - - Horizontal split mouse cursor. On Windows, it's the same as [constant CURSOR_HSIZE]. - - - Help cursor. Usually a question mark. - - - diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml deleted file mode 100644 index ea4d08c628..0000000000 --- a/doc/classes/InputDefault.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Default implementation of the [Input] class. - - - Default implementation of the [Input] class, used internally by the editor and games for default input management. - - - - - - - - diff --git a/doc/classes/InputEventFromWindow.xml b/doc/classes/InputEventFromWindow.xml new file mode 100644 index 0000000000..7cd5b7d179 --- /dev/null +++ b/doc/classes/InputEventFromWindow.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index d7e0c2454c..a315e4ddfb 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -1,5 +1,5 @@ - + Input event type for screen drag events. Only available on mobile devices. diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 4a5cd36423..16a3cf8353 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -1,5 +1,5 @@ - + Input event type for screen touch events. (only available on mobile devices) diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index 63465ad28c..34faf18e24 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -1,5 +1,5 @@ - + Base class for keys events with modifiers. diff --git a/doc/classes/InputFilter.xml b/doc/classes/InputFilter.xml new file mode 100644 index 0000000000..54184ae8a3 --- /dev/null +++ b/doc/classes/InputFilter.xml @@ -0,0 +1,477 @@ + + + + A singleton that deals with inputs. + + + A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or with the [InputMap] class. + + + https://docs.godotengine.org/en/latest/tutorials/inputs/index.html + + + + + + + + + + + This will simulate pressing the specified action. + The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. + [b]Note:[/b] This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate [code]_input[/code], use [method parse_input_event] instead. + + + + + + + + + If the specified action is already pressed, this will release it. + + + + + + + + + + + Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. + + + + + + + If the device has an accelerometer, this will return the acceleration. Otherwise, it returns an empty [Vector3]. + Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. + + + + + + + + + Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. + + + + + + + Returns an [Array] containing the device IDs of all currently connected joypads. + + + + + + + Returns the currently assigned cursor shape (see [enum CursorShape]). + + + + + + + If the device has an accelerometer, this will return the gravity. Otherwise, it returns an empty [Vector3]. + + + + + + + If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's X, Y, and Z axes. Otherwise, it returns an empty [Vector3]. + + + + + + + + + + + Returns the current value of the joypad axis at given index (see [enum JoystickList]). + + + + + + + + + Returns the index of the provided axis name. + + + + + + + + + Receives a [enum JoystickList] axis and returns its equivalent name as a string. + + + + + + + + + Returns the index of the provided button name. + + + + + + + + + Receives a gamepad button from [enum JoystickList] and returns its equivalent name as a string. + + + + + + + + + Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns [code]"Default Gamepad"[/code] otherwise. + + + + + + + + + Returns the name of the joypad at the specified device index. + + + + + + + + + Returns the duration of the current vibration effect in seconds. + + + + + + + + + Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. + + + + + + + Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. + + + + + + + If the device has a magnetometer, this will return the magnetic field strength in micro-Tesla for all axes. + + + + + + + Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. + + + + + + + Returns the mouse mode. See the constants for more information. + + + + + + + + + Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. + This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. + + + + + + + + + Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. + + + + + + + + + Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. + + + + + + + + + + + Returns [code]true[/code] if you are pressing the joypad button (see [enum JoystickList]). + + + + + + + + + Returns [code]true[/code] if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [enum JoystickList]. Unknown joypads are not expected to match these constants, but you can still retrieve events from them. + + + + + + + + + Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant. + + + + + + + + + Returns [code]true[/code] if you are pressing the mouse button specified with [enum ButtonList]. + + + + + + + + + + + + + + + Notifies the [InputFilter] singleton that a connection has changed, to update the state for the [code]device[/code] index. + This is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally. + + + + + + + + + Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. + Example: + [codeblock] + var a = InputEventAction.new() + a.action = "ui_cancel" + a.pressed = true + InputFilter.parse_input_event(a) + [/codeblock] + + + + + + + + + Removes all mappings from the internal database that match the given GUID. + + + + + + + + + + + + + Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. + [code]image[/code]'s size must be lower than 256×256. + [code]hotspot[/code] must be within [code]image[/code]'s size. + [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. + [b]Note:[/b] Only images imported with the [b]Lossless[/b], [b]Lossy[/b] or [b]Uncompressed[/b] compression modes are supported. The [b]Video RAM[/b] compression mode can't be used for custom cursors. + + + + + + + + + Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW]. + [b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. + [b]Note:[/b] This method generates an [InputEventMouseMotion] to update cursor immediately. + + + + + + + + + Sets the mouse mode. See the constants for more information. + + + + + + + + + Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. + Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. + + + + + + + + + + + + + + + Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [code]weak_magnitude[/code] is the strength of the weak motor (between 0 and 1) and [code]strong_magnitude[/code] is the strength of the strong motor (between 0 and 1). [code]duration[/code] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). + [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. + + + + + + + + + Stops the vibration of the joypad. + + + + + + + + + Vibrate Android and iOS devices. + [b]Note:[/b] It needs VIBRATE permission for Android at export settings. iOS does not support duration. + + + + + + + + + Sets the mouse position to the specified vector. + + + + + + + + + + + Emitted when a joypad device has been connected or disconnected. + + + + + + Makes the mouse cursor visible if it is hidden. + + + Makes the mouse cursor hidden if it is visible. + + + Captures the mouse. The mouse will be hidden and unable to leave the game window, but it will still register movement and mouse button presses. On Windows and Linux, the mouse will use raw input mode, which means the reported movement will be unaffected by the OS' mouse acceleration settings. + + + Makes the mouse cursor visible but confines it to the game window. + + + Arrow cursor. Standard, default pointing cursor. + + + I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. + + + Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. + + + Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. + + + Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. + + + Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). + + + Drag cursor. Usually displayed when dragging something. + + + Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. + + + Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. + + + Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. + + + Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + + + Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + + + Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. + + + Move cursor. Indicates that something can be moved. + + + Vertical split mouse cursor. On Windows, it's the same as [constant CURSOR_VSIZE]. + + + Horizontal split mouse cursor. On Windows, it's the same as [constant CURSOR_HSIZE]. + + + Help cursor. Usually a question mark. + + + diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml deleted file mode 100644 index 66df7e9531..0000000000 --- a/doc/classes/InterpolatedCamera.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - Camera which moves toward another node. - - - InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation. - If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera. - - - - - - - - - - - Sets the node to move toward and orient with. - - - - - - If [code]true[/code], and a target is set, the camera will move automatically. - - - How quickly the camera moves toward its target. Higher values will result in tighter camera motion. - - - The target's [NodePath]. - - - - - diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml deleted file mode 100644 index 34da997292..0000000000 --- a/doc/classes/Joint.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - Base class for all 3D joints. - - - Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. - - - - - - - - If [code]true[/code], the two bodies of the nodes are not able to collide with each other. - - - The node attached to the first side (A) of the joint. - - - The node attached to the second side (B) of the joint. - - - The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. - - - - - diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml new file mode 100644 index 0000000000..15bef960f6 --- /dev/null +++ b/doc/classes/Joint3D.xml @@ -0,0 +1,29 @@ + + + + Base class for all 3D joints. + + + Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. + + + + + + + + If [code]true[/code], the two bodies of the nodes are not able to collide with each other. + + + The node attached to the first side (A) of the joint. + + + The node attached to the second side (B) of the joint. + + + The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. + + + + + diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml deleted file mode 100644 index 4ccbc679bf..0000000000 --- a/doc/classes/KinematicBody.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - Kinematic body 3D node. - - - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: - [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - [b]Kinematic characters:[/b] KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. - - - https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html - - - - - - - - - Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. - - - - - - - Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. - - - - - - - Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. - - - - - - - - - Returns a [KinematicCollision], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). - - - - - - - Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. - - - - - - - Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide]. - - - - - - - Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide]. - - - - - - - Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide]. - - - - - - - - - - - - - - - Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision. - If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. - - - - - - - - - - - - - - - - - - - Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. - If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code]. - If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. - [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. - If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody] nodes like with [StaticBody]. - Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. - - - - - - - - - - - - - - - - - - - - - Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead. - - - - - - - - - - - Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. - - - - - - - - - - - - - Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. - - - - - - If the body is at least this close to another body, this body will consider them to be colliding. - - - Lock the body's X axis movement. - - - Lock the body's Y axis movement. - - - Lock the body's Z axis movement. - - - - - diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml new file mode 100644 index 0000000000..5f9b36f97d --- /dev/null +++ b/doc/classes/KinematicBody3D.xml @@ -0,0 +1,181 @@ + + + + Kinematic body 3D node. + + + Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: + [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + + + https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html + + + + + + + + + Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. + + + + + + + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. + + + + + + + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. + + + + + + + + + Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + + + + + + + Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. + + + + + + + Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide]. + + + + + + + Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide]. + + + + + + + Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide]. + + + + + + + + + + + + + + + Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. + If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. + + + + + + + + + + + + + + + + + + + Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. + This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. + [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. + If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code]. + If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. + [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. + If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody3D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. + Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + + + + + + + + + + + + + + + + + + + + + Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. + As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead. + + + + + + + + + + + Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. + + + + + + + + + + + + + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. + + + + + + If the body is at least this close to another body, this body will consider them to be colliding. + + + Lock the body's X axis movement. + + + Lock the body's Y axis movement. + + + Lock the body's Z axis movement. + + + + + diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml deleted file mode 100644 index 858a1e69c0..0000000000 --- a/doc/classes/KinematicCollision.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - Collision data for [KinematicBody] collisions. - - - Contains collision data for [KinematicBody] collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. - This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. - - - - - - - - The colliding body. - - - The colliding body's unique instance ID. See [method Object.get_instance_id]. - - - The colliding body's metadata. See [Object]. - - - The colliding body's shape. - - - The colliding shape's index. See [CollisionObject]. - - - The colliding object's velocity. - - - The moving object's colliding shape. - - - The colliding body's shape's normal at the point of collision. - - - The point of collision, in global coordinates. - - - The moving object's remaining movement vector. - - - The distance the moving object traveled before collision. - - - - - diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml new file mode 100644 index 0000000000..f3248a9ca1 --- /dev/null +++ b/doc/classes/KinematicCollision3D.xml @@ -0,0 +1,51 @@ + + + + Collision data for [KinematicBody3D] collisions. + + + Contains collision data for [KinematicBody3D] collisions. When a [KinematicBody3D] is moved using [method KinematicBody3D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision3D object is returned. + This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. + + + + + + + + The colliding body. + + + The colliding body's unique instance ID. See [method Object.get_instance_id]. + + + The colliding body's metadata. See [Object]. + + + The colliding body's shape. + + + The colliding shape's index. See [CollisionObject3D]. + + + The colliding object's velocity. + + + The moving object's colliding shape. + + + The colliding body's shape's normal at the point of collision. + + + The point of collision, in global coordinates. + + + The moving object's remaining movement vector. + + + The distance the moving object traveled before collision. + + + + + diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml deleted file mode 100644 index a2867a50d2..0000000000 --- a/doc/classes/Light.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - Provides a base class for different kinds of light nodes. - - - Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. - - - https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html - - - - - - - - - Returns the value of the specified [enum Light.Param] parameter. - - - - - - - - - - - Sets the value of the specified [enum Light.Param] parameter. - - - - - - If [code]true[/code], the light only appears in the editor and will not be visible at runtime. - - - The light's bake mode. See [enum BakeMode]. - - - The light's color. - - - The light will affect objects in the selected layers. - - - The light's strength multiplier. - - - Secondary multiplier used with indirect light (light bounces). Used with [GIProbe]. - - - If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. - - - The intensity of the specular blob in objects affected by the light. At [code]0[/code] the light becomes a pure diffuse light. - - - Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed. - - - The color of shadows cast by this light. - - - Attempts to reduce [member shadow_bias] gap. - - - If [code]true[/code], the light will cast shadows. - - - If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]. - - - - - Constant for accessing [member light_energy]. - - - Constant for accessing [member light_indirect_energy]. - - - Constant for accessing [member light_specular]. - - - Constant for accessing [member OmniLight.omni_range] or [member SpotLight.spot_range]. - - - Constant for accessing [member OmniLight.omni_attenuation] or [member SpotLight.spot_attenuation]. - - - Constant for accessing [member SpotLight.spot_angle]. - - - Constant for accessing [member SpotLight.spot_angle_attenuation]. - - - Constant for accessing [member shadow_contact]. - - - Constant for accessing [member DirectionalLight.directional_shadow_max_distance]. - - - Constant for accessing [member DirectionalLight.directional_shadow_split_1]. - - - Constant for accessing [member DirectionalLight.directional_shadow_split_2]. - - - Constant for accessing [member DirectionalLight.directional_shadow_split_3]. - - - - - Constant for accessing [member DirectionalLight.directional_shadow_normal_bias]. - - - Constant for accessing [member shadow_bias]. - - - Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale]. - - - Represents the size of the [enum Param] enum. - - - Light is ignored when baking. - [b]Note:[/b] Hiding a light does [i]not[/i] affect baking. - - - Only indirect lighting will be baked (default). - - - Both direct and indirect light will be baked. - [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked). - - - diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml new file mode 100644 index 0000000000..4e48a24951 --- /dev/null +++ b/doc/classes/Light3D.xml @@ -0,0 +1,138 @@ + + + + Provides a base class for different kinds of light nodes. + + + Light3D is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting. + + + https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html + + + + + + + + + Returns the value of the specified [enum Light3D.Param] parameter. + + + + + + + + + + + Sets the value of the specified [enum Light3D.Param] parameter. + + + + + + If [code]true[/code], the light only appears in the editor and will not be visible at runtime. + + + The light's bake mode. See [enum BakeMode]. + + + The light's color. + + + The light will affect objects in the selected layers. + + + The light's strength multiplier. + + + Secondary multiplier used with indirect light (light bounces). Used with [GIProbe]. + + + If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. + + + The intensity of the specular blob in objects affected by the light. At [code]0[/code] the light becomes a pure diffuse light. + + + Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed. + + + The color of shadows cast by this light. + + + Attempts to reduce [member shadow_bias] gap. + + + If [code]true[/code], the light will cast shadows. + + + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance3D.SHADOW_CASTING_SETTING_DOUBLE_SIDED]. + + + + + Constant for accessing [member light_energy]. + + + Constant for accessing [member light_indirect_energy]. + + + Constant for accessing [member light_specular]. + + + Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range]. + + + Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation]. + + + Constant for accessing [member SpotLight3D.spot_angle]. + + + Constant for accessing [member SpotLight3D.spot_angle_attenuation]. + + + Constant for accessing [member shadow_contact]. + + + Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance]. + + + Constant for accessing [member DirectionalLight3D.directional_shadow_split_1]. + + + Constant for accessing [member DirectionalLight3D.directional_shadow_split_2]. + + + Constant for accessing [member DirectionalLight3D.directional_shadow_split_3]. + + + + + Constant for accessing [member DirectionalLight3D.directional_shadow_normal_bias]. + + + Constant for accessing [member shadow_bias]. + + + Constant for accessing [member DirectionalLight3D.directional_shadow_bias_split_scale]. + + + Represents the size of the [enum Param] enum. + + + Light is ignored when baking. + [b]Note:[/b] Hiding a light does [i]not[/i] affect baking. + + + Only indirect lighting will be baked (default). + + + Both direct and indirect light will be baked. + [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked). + + + diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml deleted file mode 100644 index 72bbfa29d4..0000000000 --- a/doc/classes/Listener.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - Overrides the location sounds are heard from. - - - Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera]. - [b]Note:[/b] There is no 2D equivalent for this node yet. - - - - - - - - - Disables the listener to use the current camera's listener instead. - - - - - - - Returns the listener's global orthonormalized [Transform]. - - - - - - - Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise. - [b]Note:[/b] There may be more than one Listener marked as "current" in the scene tree, but only the one that was made current last will be used. - - - - - - - Enables the listener. This will override the current camera's listener. - - - - - - diff --git a/doc/classes/Listener3D.xml b/doc/classes/Listener3D.xml new file mode 100644 index 0000000000..998ea757ff --- /dev/null +++ b/doc/classes/Listener3D.xml @@ -0,0 +1,45 @@ + + + + Overrides the location sounds are heard from. + + + Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera3D]. + [b]Note:[/b] There is no 2D equivalent for this node yet. + + + + + + + + + Disables the listener to use the current camera's listener instead. + + + + + + + Returns the listener's global orthonormalized [Transform]. + + + + + + + Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise. + [b]Note:[/b] There may be more than one Listener3D marked as "current" in the scene tree, but only the one that was made current last will be used. + + + + + + + Enables the listener. This will override the current camera's listener. + + + + + + diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index a0c1979646..a37c8127f0 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -4,7 +4,7 @@ Abstract base [Resource] for coloring and shading geometry. - Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. + Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index dc7ffc8934..6958c815a6 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -10,10 +10,10 @@ - + - Calculate a [ConvexPolygonShape] from the mesh. + Calculate a [ConvexPolygonShape3D] from the mesh. @@ -27,10 +27,10 @@ - + - Calculate a [ConcavePolygonShape] from the mesh. + Calculate a [ConcavePolygonShape3D] from the mesh. diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml deleted file mode 100644 index 6123dfa37a..0000000000 --- a/doc/classes/MeshInstance.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - Node that instances meshes into a scenario. - - - MeshInstance is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead. - - - - - - - - - This helper creates a [StaticBody] child node with a [ConvexPolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing. - - - - - - - This helper creates a [MeshInstance] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. - - - - - - - This helper creates a [StaticBody] child node with a [ConcavePolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing. - - - - - - - - - Returns the [Material] for a surface of the [Mesh] resource. - - - - - - - Returns the number of surface materials. - - - - - - - - - - - Sets the [Material] for a surface of the [Mesh] resource. - - - - - - The [Mesh] resource for the instance. - - - [NodePath] to the [Skeleton] associated with the instance. - - - Sets the skin to be used by this instance. - - - - - diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 2781dd4626..0cfc8deb0a 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -4,7 +4,7 @@ Node used for displaying a [Mesh] in 2D. - Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite] via a tool in the editor toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". + Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite2D] via a tool in the editor toolbar. Select "Sprite2D" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml new file mode 100644 index 0000000000..9276c5dc65 --- /dev/null +++ b/doc/classes/MeshInstance3D.xml @@ -0,0 +1,74 @@ + + + + Node that instances meshes into a scenario. + + + MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead. + + + + + + + + + This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. + + + + + + + This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. + + + + + + + This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. + + + + + + + + + Returns the [Material] for a surface of the [Mesh] resource. + + + + + + + Returns the number of surface materials. + + + + + + + + + + + Sets the [Material] for a surface of the [Mesh] resource. + + + + + + The [Mesh] resource for the instance. + + + [NodePath] to the [Skeleton3D] associated with the instance. + + + Sets the skin to be used by this instance. + + + + + diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index a96f6d7231..ccf6172017 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -94,7 +94,7 @@ Returns an item's collision shapes. - The array consists of each [Shape] followed by its [Transform]. + The array consists of each [Shape3D] followed by its [Transform]. @@ -178,7 +178,7 @@ Sets an item's collision shapes. - The array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]. + The array should consist of [Shape3D] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]. diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 2a1d270990..0f56ab4b95 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -4,7 +4,7 @@ Provides high-performance mesh instancing. - MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow, since each object is submitted to the GPU then drawn individually. + MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance3D] nodes can be slow, since each object is submitted to the GPU then drawn individually. MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml deleted file mode 100644 index 6cbc0a8e04..0000000000 --- a/doc/classes/MultiMeshInstance.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - Node that instances a [MultiMesh]. - - - [MultiMeshInstance] is a specialized node to instance [GeometryInstance]s based on a [MultiMesh] resource. - This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). - - - https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html - https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html - https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html - - - - - - The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance]. - - - - - diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index 2fe5447a27..07f21514ef 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -5,7 +5,7 @@ [MultiMeshInstance2D] is a specialized node to instance a [MultiMesh] resource in 2D. - Usage is the same as [MultiMeshInstance]. + Usage is the same as [MultiMeshInstance3D]. diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml new file mode 100644 index 0000000000..cab17c952e --- /dev/null +++ b/doc/classes/MultiMeshInstance3D.xml @@ -0,0 +1,24 @@ + + + + Node that instances a [MultiMesh]. + + + [MultiMeshInstance3D] is a specialized node to instance [GeometryInstance3D]s based on a [MultiMesh] resource. + This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). + + + https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html + https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html + https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html + + + + + + The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance3D]. + + + + + diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml deleted file mode 100644 index 93170bca4a..0000000000 --- a/doc/classes/Navigation.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - Mesh-based navigation and pathfinding node. - - - Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. - - - - - - - - - - - Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. - - - - - - - - - Returns the normal for the point returned by [method get_closest_point]. - - - - - - - - - Returns the owner region RID for the point returned by [method get_closest_point]. - - - - - - - - - - - - - Returns the closest point between the navigation surface and the segment. - - - - - - - - - - - - - - - - - - - Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. - - - - - - - - - - Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction. - - - - - diff --git a/doc/classes/Navigation2DServer.xml b/doc/classes/Navigation2DServer.xml deleted file mode 100644 index 110844c492..0000000000 --- a/doc/classes/Navigation2DServer.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - Server interface for low-level 2D navigation access - - - Navigation2DServer is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. - - - - - - - - - Creates the agent. - - - - - - - - - Returns true if the map got changed the previous frame. - - - - - - - - - - - - - - - Callback called at the end of the RVO process. - - - - - - - - - - - Puts the agent in the map. - - - - - - - - - - - Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. - - - - - - - - - - - Sets the maximum speed of the agent. Must be positive. - - - - - - - - - - - Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. - - - - - - - - - - - Sets the position of the agent in world space. - - - - - - - - - - - Sets the radius of the agent. - - - - - - - - - - - Sets the new target velocity. - - - - - - - - - - - The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. - - - - - - - - - - - Sets the current velocity of the agent. - - - - - - - - - Destroy the RID - - - - - - - Create a new map. - - - - - - - - - Returns the map cell size. - - - - - - - - - - - Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. - - - - - - - - - - - Returns the owner region RID for the point returned by [method map_get_closest_point]. - - - - - - - - - Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. - - - - - - - - - - - - - - - Returns the navigation path to reach the destination from the origin, while avoiding static obstacles. - - - - - - - - - Returns true if the map is active. - - - - - - - - - - - Sets the map active. - - - - - - - - - - - Set the map cell size used to weld the navigation mesh polygons. - - - - - - - - - - - Set the map edge connection margin used to weld the compatible region edges. - - - - - - - Creates a new region. - - - - - - - - - - - Sets the map for the region. - - - - - - - - - - - Sets the navigation mesh for the region. - - - - - - - - - - - Sets the global transformation for the region. - - - - - - diff --git a/doc/classes/Navigation3D.xml b/doc/classes/Navigation3D.xml new file mode 100644 index 0000000000..807f0ad309 --- /dev/null +++ b/doc/classes/Navigation3D.xml @@ -0,0 +1,83 @@ + + + + Mesh-based navigation and pathfinding node. + + + Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. + + + + + + + + + + + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + + + + + + + + + Returns the normal for the point returned by [method get_closest_point]. + + + + + + + + + Returns the owner region RID for the point returned by [method get_closest_point]. + + + + + + + + + + + + + Returns the closest point between the navigation surface and the segment. + + + + + + + + + + + + + + + + + + + Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. + + + + + + + + + + Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction. + + + + + diff --git a/doc/classes/NavigationAgent.xml b/doc/classes/NavigationAgent.xml deleted file mode 100644 index c6c9abec13..0000000000 --- a/doc/classes/NavigationAgent.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - 3D Agent used in navigation for collision avoidance. - - - 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation] node, or using [method set_navigation]. [NavigationAgent] is physics safe. - - - - - - - - - Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. - - - - - - - Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. - - - - - - - Returns the path from start to finish in global coordinates. - - - - - - - Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. - - - - - - - Returns the [Navigation] node that the agent is using for its navigation system. - - - - - - - Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. - - - - - - - Returns the user defined [Vector3] after setting the target location. - - - - - - - Returns true if the navigation path's final location has been reached. - - - - - - - Returns true if the target location is reachable. The target location is set using [method set_target_location]. - - - - - - - Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. - - - - - - - - - Sets the [Navigation] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation] node. - - - - - - - - - Sets the user desired final location. This will clear the current navigation path. - - - - - - - - - Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. - - - - - - The agent height offset to match the navigation mesh height. - - - Ignores collisions on the Y axis. Must be true to move on a horizontal plane. - - - The maximum number of neighbors for the agent to consider. - - - The maximum speed that an agent can move. - - - The distance to search for other agents. - - - The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. - - - The radius of the agent. - - - The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. - - - The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. - - - - - - Notifies when the final location is reached. - - - - - Notifies when the navigation path changes. - - - - - Notifies when the player defined target, set with [method set_target_location], is reached. - - - - - - - Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. - - - - - - diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml new file mode 100644 index 0000000000..f9df1d390b --- /dev/null +++ b/doc/classes/NavigationAgent3D.xml @@ -0,0 +1,165 @@ + + + + 3D Agent used in navigation for collision avoidance. + + + 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationAgent3D] is physics safe. + + + + + + + + + Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + + + + + + + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. + + + + + + + Returns the path from start to finish in global coordinates. + + + + + + + Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. + + + + + + + Returns the [Navigation3D] node that the agent is using for its navigation system. + + + + + + + Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. + + + + + + + Returns the user defined [Vector3] after setting the target location. + + + + + + + Returns true if the navigation path's final location has been reached. + + + + + + + Returns true if the target location is reachable. The target location is set using [method set_target_location]. + + + + + + + Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + + + + + + + + + Sets the [Navigation3D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation3D] node. + + + + + + + + + Sets the user desired final location. This will clear the current navigation path. + + + + + + + + + Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. + + + + + + The agent height offset to match the navigation mesh height. + + + Ignores collisions on the Y axis. Must be true to move on a horizontal plane. + + + The maximum number of neighbors for the agent to consider. + + + The maximum speed that an agent can move. + + + The distance to search for other agents. + + + The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. + + + The radius of the agent. + + + The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. + + + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + + + + + + Notifies when the final location is reached. + + + + + Notifies when the navigation path changes. + + + + + Notifies when the player defined target, set with [method set_target_location], is reached. + + + + + + + Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. + + + + + + diff --git a/doc/classes/NavigationObstacle.xml b/doc/classes/NavigationObstacle.xml deleted file mode 100644 index 31cf01793a..0000000000 --- a/doc/classes/NavigationObstacle.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - 3D Obstacle used in navigation for collision avoidance. - - - 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation] node, or using [method set_navigation]. [NavigationObstacle] is physics safe. - - - - - - - - - Returns the [Navigation] node that the obstacle is using for its navigation system. - - - - - - - - - Sets the [Navigation] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation] node. - - - - - - diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml index 4d12b985e0..ddd96975f1 100644 --- a/doc/classes/NavigationObstacle2D.xml +++ b/doc/classes/NavigationObstacle2D.xml @@ -4,7 +4,7 @@ 2D Obstacle used in navigation for collision avoidance. - 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle] is physics safe. + 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle2D] is physics safe. diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml new file mode 100644 index 0000000000..e01a40ed73 --- /dev/null +++ b/doc/classes/NavigationObstacle3D.xml @@ -0,0 +1,31 @@ + + + + 3D Obstacle used in navigation for collision avoidance. + + + 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationObstacle3D] is physics safe. + + + + + + + + + Returns the [Navigation3D] node that the obstacle is using for its navigation system. + + + + + + + + + Sets the [Navigation3D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation3D] node. + + + + + + diff --git a/doc/classes/NavigationRegion.xml b/doc/classes/NavigationRegion.xml deleted file mode 100644 index a32ded2878..0000000000 --- a/doc/classes/NavigationRegion.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - A region of the navigation map. - - - A region of the navigation map. It tells the [Navigation] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation] node (even not a direct child). - - - - - - - - - Bakes the [NavigationMesh]. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. - - - - - - Determines if the [NavigationRegion] is enabled or disabled. - - - The [NavigationMesh] resource to use. - - - - - - Notifies when the navigation mesh bake operation is completed. - - - - - Notifies when the [NavigationMesh] has changed. - - - - - - diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml new file mode 100644 index 0000000000..b70bfb6596 --- /dev/null +++ b/doc/classes/NavigationRegion3D.xml @@ -0,0 +1,42 @@ + + + + A region of the navigation map. + + + A region of the navigation map. It tells the [Navigation3D] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation3D] node (even not a direct child). + + + + + + + + + Bakes the [NavigationMesh]. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. + + + + + + Determines if the [NavigationRegion3D] is enabled or disabled. + + + The [NavigationMesh] resource to use. + + + + + + Notifies when the navigation mesh bake operation is completed. + + + + + Notifies when the [NavigationMesh] has changed. + + + + + + diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml deleted file mode 100644 index 1b534b8458..0000000000 --- a/doc/classes/NavigationServer.xml +++ /dev/null @@ -1,375 +0,0 @@ - - - - Server interface for low-level 3D navigation access - - - NavigationServer is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. - - - - - - - - - Creates the agent. - - - - - - - - - Returns true if the map got changed the previous frame. - - - - - - - - - - - - - - - Callback called at the end of the RVO process. - - - - - - - - - - - Puts the agent in the map. - - - - - - - - - - - Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. - - - - - - - - - - - Sets the maximum speed of the agent. Must be positive. - - - - - - - - - - - Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. - - - - - - - - - - - Sets the position of the agent in world space. - - - - - - - - - - - Sets the radius of the agent. - - - - - - - - - - - Sets the new target velocity. - - - - - - - - - - - The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. - - - - - - - - - - - Sets the current velocity of the agent. - - - - - - - - - Destroy the RID - - - - - - - Create a new map. - - - - - - - - - Returns the map cell size. - - - - - - - - - - - Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. - - - - - - - - - - - Returns the normal for the point returned by [method map_get_closest_point]. - - - - - - - - - - - Returns the owner region RID for the point returned by [method map_get_closest_point]. - - - - - - - - - - - - - - - Returns the closest point between the navigation surface and the segment. - - - - - - - - - Returns the edge connection margin of the map. - - - - - - - - - - - - - - - Returns the navigation path to reach the destination from the origin. - - - - - - - - - Returns the map's up direction. - - - - - - - - - Returns true if the map is active. - - - - - - - - - - - Sets the map active. - - - - - - - - - - - Set the map cell size used to weld the navigation mesh polygons. - - - - - - - - - - - Set the map edge connection margein used to weld the compatible region edges. - - - - - - - - - - - Sets the map up direction. - - - - - - - - - Process the collision avoidance agents. - The result of this process is needed by the physics server, so this must be called in the main thread. - Note: This function is not thread safe. - - - - - - - - - - - Bakes the navigation mesh. - - - - - - - Creates a new region. - - - - - - - - - - - Sets the map for the region. - - - - - - - - - - - Sets the navigation mesh for the region. - - - - - - - - - - - Sets the global transformation for the region. - - - - - - - - - Control activation of this server. - - - - - - diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml new file mode 100644 index 0000000000..1b9099336c --- /dev/null +++ b/doc/classes/NavigationServer2D.xml @@ -0,0 +1,298 @@ + + + + Server interface for low-level 2D navigation access + + + NavigationServer2D is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + + + + + + + + + Creates the agent. + + + + + + + + + Returns true if the map got changed the previous frame. + + + + + + + + + + + + + + + Callback called at the end of the RVO process. + + + + + + + + + + + Puts the agent in the map. + + + + + + + + + + + Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + + + + + + + + + + + Sets the maximum speed of the agent. Must be positive. + + + + + + + + + + + Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + + + + + + + + + + + Sets the position of the agent in world space. + + + + + + + + + + + Sets the radius of the agent. + + + + + + + + + + + Sets the new target velocity. + + + + + + + + + + + The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. + + + + + + + + + + + Sets the current velocity of the agent. + + + + + + + + + Destroy the RID + + + + + + + Create a new map. + + + + + + + + + Returns the map cell size. + + + + + + + + + + + Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + + + + + + + + + + + Returns the owner region RID for the point returned by [method map_get_closest_point]. + + + + + + + + + Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. + + + + + + + + + + + + + + + Returns the navigation path to reach the destination from the origin, while avoiding static obstacles. + + + + + + + + + Returns true if the map is active. + + + + + + + + + + + Sets the map active. + + + + + + + + + + + Set the map cell size used to weld the navigation mesh polygons. + + + + + + + + + + + Set the map edge connection margin used to weld the compatible region edges. + + + + + + + Creates a new region. + + + + + + + + + + + Sets the map for the region. + + + + + + + + + + + Sets the navigation mesh for the region. + + + + + + + + + + + Sets the global transformation for the region. + + + + + + diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml new file mode 100644 index 0000000000..1f621c3c81 --- /dev/null +++ b/doc/classes/NavigationServer3D.xml @@ -0,0 +1,375 @@ + + + + Server interface for low-level 3D navigation access + + + NavigationServer3D is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + + + + + + + + + Creates the agent. + + + + + + + + + Returns true if the map got changed the previous frame. + + + + + + + + + + + + + + + Callback called at the end of the RVO process. + + + + + + + + + + + Puts the agent in the map. + + + + + + + + + + + Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + + + + + + + + + + + Sets the maximum speed of the agent. Must be positive. + + + + + + + + + + + Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + + + + + + + + + + + Sets the position of the agent in world space. + + + + + + + + + + + Sets the radius of the agent. + + + + + + + + + + + Sets the new target velocity. + + + + + + + + + + + The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. + + + + + + + + + + + Sets the current velocity of the agent. + + + + + + + + + Destroy the RID + + + + + + + Create a new map. + + + + + + + + + Returns the map cell size. + + + + + + + + + + + Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. + + + + + + + + + + + Returns the normal for the point returned by [method map_get_closest_point]. + + + + + + + + + + + Returns the owner region RID for the point returned by [method map_get_closest_point]. + + + + + + + + + + + + + + + Returns the closest point between the navigation surface and the segment. + + + + + + + + + Returns the edge connection margin of the map. + + + + + + + + + + + + + + + Returns the navigation path to reach the destination from the origin. + + + + + + + + + Returns the map's up direction. + + + + + + + + + Returns true if the map is active. + + + + + + + + + + + Sets the map active. + + + + + + + + + + + Set the map cell size used to weld the navigation mesh polygons. + + + + + + + + + + + Set the map edge connection margein used to weld the compatible region edges. + + + + + + + + + + + Sets the map up direction. + + + + + + + + + Process the collision avoidance agents. + The result of this process is needed by the physics server, so this must be called in the main thread. + Note: This function is not thread safe. + + + + + + + + + + + Bakes the navigation mesh. + + + + + + + Creates a new region. + + + + + + + + + + + Sets the map for the region. + + + + + + + + + + + Sets the navigation mesh for the region. + + + + + + + + + + + Sets the global transformation for the region. + + + + + + + + + Control activation of this server. + + + + + + diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml new file mode 100644 index 0000000000..ef24f638fb --- /dev/null +++ b/doc/classes/Node3D.xml @@ -0,0 +1,350 @@ + + + + Most basic 3D game object, parent of all 3D-related nodes. + + + Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. + Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system. + + + https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html + + + + + + + Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. + + + + + + + Returns the parent [Node3D], or an empty [Object] if no parent exists or parent is not of type [Node3D]. + + + + + + + Returns the current [World3D] resource this [Node3D] node is registered to. + + + + + + + + + + + Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system. + + + + + + + + + Scales the global (world) transformation by the given [Vector3] scale factors. + + + + + + + + + Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system. + + + + + + + Disables rendering of this node. Changes [member visible] to [code]false[/code]. + + + + + + + Returns whether node notifies about its local transformation changes. [Node3D] will not propagate this by default. + + + + + + + Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. + + + + + + + Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations. + + + + + + + Returns whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default. + + + + + + + Returns whether the node is visible, taking into consideration that its parents visibility. + + + + + + + + + + + Rotates itself so that the local -Z axis points towards the [code]target[/code] position. + The transform will first be rotated around the given [code]up[/code] vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the [code]target[/code] and [code]up[/code] vectors. + Operations take place in global space. + + + + + + + + + + + + + Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. + + + + + + + Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform]. + + + + + + + + + + + Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. + + + + + + + + + + + Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system. + + + + + + + + + Rotates the local transformation around the X axis by angle in radians. + + + + + + + + + Rotates the local transformation around the Y axis by angle in radians. + + + + + + + + + Rotates the local transformation around the Z axis by angle in radians. + + + + + + + + + Scales the local transformation by given 3D scale factors in object-local coordinate system. + + + + + + + + + Makes the node ignore its parents transformations. Node transformations are only in global space. + + + + + + + + + Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved. + + + + + + + Reset all transformations for this node (sets its [Transform] to the identity matrix). + + + + + + + + + Sets whether the node ignores notification that its transformation (global or local) changed. + + + + + + + + + Sets whether the node notifies about its local transformation changes. [Node3D] will not propagate this by default. + + + + + + + + + Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default. + + + + + + + Enables rendering of this node. Changes [member visible] to [code]true[/code]. + + + + + + + + + Transforms [code]local_point[/code] from this node's local space to world space. + + + + + + + + + Transforms [code]global_point[/code] from world space to this node's local space. + + + + + + + + + Changes the node's position by the given offset [Vector3]. + Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. + + + + + + + + + Changes the node's position by the given offset [Vector3] in local space. + + + + + + + Updates the [Node3DGizmo] of this node. + + + + + + The [Node3DGizmo] for this node. Used for example in [EditorNode3DGizmo] as custom visualization and editing handles in Editor. + + + World3D space (global) [Transform] of this node. + + + Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). + [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + + + Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). + + + Scale part of the local transformation. + + + Local space [Transform] of this node, with respect to the parent node. + + + Local translation of this node. + + + If [code]true[/code], this node is drawn. + + + + + + Emitted when node visibility changes. + + + + + + Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. + In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. + + + Node3D nodes receives this notification when they are registered to new [World3D] resource. + + + Node3D nodes receives this notification when they are unregistered from current [World3D] resource. + + + Node3D nodes receives this notification when their visibility changes. + + + diff --git a/doc/classes/Node3DGizmo.xml b/doc/classes/Node3DGizmo.xml new file mode 100644 index 0000000000..55080614fc --- /dev/null +++ b/doc/classes/Node3DGizmo.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index e8ab3e536e..dc7fd1be3f 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -4,7 +4,7 @@ Pre-parsed scene tree path. - A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite"[/code] which is a child of the other named nodes in the path. + A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite2D"[/code] which is a child of the other named nodes in the path. You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]@"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful. A [NodePath] is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties. Some examples of NodePaths include the following: @@ -30,20 +30,20 @@ - Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. + Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested. Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties): [codeblock] - # Points to the Sprite node - "Path2D/PathFollow2D/Sprite" - # Points to the Sprite node and its "texture" resource. - # get_node() would retrieve "Sprite", while get_node_and_resource() - # would retrieve both the Sprite node and the "texture" resource. - "Path2D/PathFollow2D/Sprite:texture" - # Points to the Sprite node and its "position" property. - "Path2D/PathFollow2D/Sprite:position" - # Points to the Sprite node and the "x" component of its "position" property. - "Path2D/PathFollow2D/Sprite:position:x" + # Points to the Sprite2D node + "Path2D/PathFollow2D/Sprite2D" + # Points to the Sprite2D node and its "texture" resource. + # get_node() would retrieve "Sprite2D", while get_node_and_resource() + # would retrieve both the Sprite2D node and the "texture" resource. + "Path2D/PathFollow2D/Sprite2D:texture" + # Points to the Sprite2D node and its "position" property. + "Path2D/PathFollow2D/Sprite2D:position" + # Points to the Sprite2D node and the "x" component of its "position" property. + "Path2D/PathFollow2D/Sprite2D:position:x" # Absolute path (from "root") "/root/Level/Path2D" [/codeblock] @@ -69,7 +69,7 @@ Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path. [codeblock] - var nodepath = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path") + var nodepath = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") print(nodepath.get_concatenated_subnames()) # texture:load_path [/codeblock] @@ -82,7 +82,7 @@ Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]). [codeblock] - var node_path = NodePath("Path2D/PathFollow2D/Sprite") + var node_path = NodePath("Path2D/PathFollow2D/Sprite2D") print(node_path.get_name(0)) # Path2D print(node_path.get_name(1)) # PathFollow2D print(node_path.get_name(2)) # Sprite @@ -94,7 +94,7 @@ Gets the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included. - For example, [code]"Path2D/PathFollow2D/Sprite"[/code] has 3 names. + For example, [code]"Path2D/PathFollow2D/Sprite2D"[/code] has 3 names. @@ -105,7 +105,7 @@ Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]). [codeblock] - var node_path = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path") + var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") print(node_path.get_subname(0)) # texture print(node_path.get_subname(1)) # load_path [/codeblock] @@ -116,7 +116,7 @@ Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path. - For example, [code]"Path2D/PathFollow2D/Sprite:texture:load_path"[/code] has 2 subnames. + For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 33f5fc0f35..35e87d1a2a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -314,7 +314,7 @@ - + Returns [code]true[/code] if the given [code]signal[/code] exists. diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml deleted file mode 100644 index dc57efd3f9..0000000000 --- a/doc/classes/OmniLight.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - Omnidirectional light, such as a light bulb or a candle. - - - An Omnidirectional light is a type of [Light] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. - - - https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html - - - - - - The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. - - - The light's radius. - - - See [enum ShadowMode]. - - - - - Shadows are rendered to a dual-paraboloid texture. Faster than [constant SHADOW_CUBE], but lower-quality. - - - Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. - - - diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml new file mode 100644 index 0000000000..0bbc987156 --- /dev/null +++ b/doc/classes/OmniLight3D.xml @@ -0,0 +1,33 @@ + + + + Omnidirectional light, such as a light bulb or a candle. + + + An Omnidirectional light is a type of [Light3D] that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. + + + https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html + + + + + + The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. + + + The light's radius. + + + See [enum ShadowMode]. + + + + + Shadows are rendered to a dual-paraboloid texture. Faster than [constant SHADOW_CUBE], but lower-quality. + + + Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. + + + diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml deleted file mode 100644 index 74651ddd2f..0000000000 --- a/doc/classes/Particles.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - 3D particle emitter. - - - 3D particle node used to create a variety of particle systems and effects. [Particles] features an emitter that generates some number of particles at a given rate. - Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. - - - https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html - - - - - - - Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. - - - - - - - - - Returns the [Mesh] that is drawn at index [code]pass[/code]. - - - - - - - Restarts the particle emission, clearing existing particles. - - - - - - - - - - - Sets the [Mesh] that is drawn at index [code]pass[/code]. - - - - - - Number of particles to emit. - - - Particle draw order. Uses [enum DrawOrder] values. - - - [Mesh] that is drawn for the first draw pass. - - - [Mesh] that is drawn for the second draw pass. - - - [Mesh] that is drawn for the third draw pass. - - - [Mesh] that is drawn for the fourth draw pass. - - - The number of draw passes when rendering particles. - - - If [code]true[/code], particles are being emitted. - - - Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously. - - - The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. - - - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. - - - Amount of time each particle will exist. - - - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. - - - If [code]true[/code], only [code]amount[/code] particles will be emitted. - - - Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. - - - [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. - - - Emission randomness ratio. - - - Speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. - - - The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active. - - - - - Particles are drawn in the order emitted. - - - Particles are drawn in order of remaining lifetime. - - - Particles are drawn in order of depth. - - - Maximum number of draw passes supported. - - - diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml deleted file mode 100644 index 50fc3680bc..0000000000 --- a/doc/classes/Particles2D.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - 2D particle emitter. - - - 2D particle node used to create a variety of particle systems and effects. [Particles2D] features an emitter that generates some number of particles at a given rate. - Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. - - - https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html - - - - - - - Returns a rectangle containing the positions of all existing particles. - - - - - - - Restarts all the existing particles. - - - - - - Number of particles emitted in one emission cycle. - - - Particle draw order. Uses [enum DrawOrder] values. - - - If [code]true[/code], particles are being emitted. - - - How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. - - - The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. - - - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. - - - Amount of time each particle will exist. - - - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. - - - Normal map to be used for the [member texture] property. - - - If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. - - - Particle system starts as if it had already run for this many seconds. - - - [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. - - - Emission lifetime randomness ratio. - - - Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. - - - Particle texture. If [code]null[/code], particles will be squares. - - - Editor visibility helper. - - - - - Particles are drawn in the order emitted. - - - Particles are drawn in order of remaining lifetime. - - - diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 1e90214e47..d04ac5bdce 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -1,10 +1,10 @@ - Particle properties for [Particles] and [Particles2D] nodes. + Particle properties for [GPUParticles3D] and [GPUParticles2D] nodes. - ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [Particles] and [Particles2D] emitter nodes. + ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [GPUParticles3D] and [GPUParticles2D] emitter nodes. Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle. When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between [code]1.0[/code] and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of [code]0.4[/code] would scale the original property between [code]0.4-1.0[/code] of its original value. @@ -132,7 +132,7 @@ Animation speed randomness ratio. - Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. + Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. Each particle's color will vary along this [GradientTexture]. diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml deleted file mode 100644 index 801e86ff9e..0000000000 --- a/doc/classes/Path.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - Contains a [Curve3D] path for [PathFollow] nodes to follow. - - - Can have [PathFollow] child nodes moving along the [Curve3D]. See [PathFollow] for more information on the usage. - Note that the path is considered as relative to the moved nodes (children of [PathFollow]). As such, the curve should usually start with a zero vector [code](0, 0, 0)[/code]. - - - - - - - - A [Curve3D] describing the path. - - - - - - Emitted when the [member curve] changes. - - - - - - diff --git a/doc/classes/Path3D.xml b/doc/classes/Path3D.xml new file mode 100644 index 0000000000..b97e7efd5d --- /dev/null +++ b/doc/classes/Path3D.xml @@ -0,0 +1,28 @@ + + + + Contains a [Curve3D] path for [PathFollow3D] nodes to follow. + + + Can have [PathFollow3D] child nodes moving along the [Curve3D]. See [PathFollow3D] for more information on the usage. + Note that the path is considered as relative to the moved nodes (children of [PathFollow3D]). As such, the curve should usually start with a zero vector [code](0, 0, 0)[/code]. + + + + + + + + A [Curve3D] describing the path. + + + + + + Emitted when the [member curve] changes. + + + + + + diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml deleted file mode 100644 index 85ca5b787f..0000000000 --- a/doc/classes/PathFollow.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - Point sampler for a [Path]. - - - This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex. - It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. - - - - - - - - If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. - The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. - - - The node's offset along the curve. - - - If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. - - - The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. - - - Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used. - - - The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. - - - The node's offset perpendicular to the curve. - - - - - Forbids the PathFollow to rotate. - - - Allows the PathFollow to rotate in the Y axis only. - - - Allows the PathFollow to rotate in both the X, and Y axes. - - - Allows the PathFollow to rotate in any axis. - - - Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path]'s [member Curve3D.up_vector_enabled] property to be set to [code]true[/code]. - - - diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml new file mode 100644 index 0000000000..f405bdedfc --- /dev/null +++ b/doc/classes/PathFollow3D.xml @@ -0,0 +1,56 @@ + + + + Point sampler for a [Path3D]. + + + This node takes its parent [Path3D], and returns the coordinates of a point within it, given a distance from the first vertex. + It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. + + + + + + + + If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. + The points along the [Curve3D] of the [Path3D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + + + The node's offset along the curve. + + + If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. + + + The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. + + + Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used. + + + The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. + + + The node's offset perpendicular to the curve. + + + + + Forbids the PathFollow3D to rotate. + + + Allows the PathFollow3D to rotate in the Y axis only. + + + Allows the PathFollow3D to rotate in both the X, and Y axes. + + + Allows the PathFollow3D to rotate in any axis. + + + Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path3D]'s [member Curve3D.up_vector_enabled] property to be set to [code]true[/code]. + + + diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 378b165644..2a0c153267 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -95,7 +95,7 @@ Number of islands in the 2D physics engine. - Number of active [RigidBody] and [VehicleBody] nodes in the game. + Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. Number of collision pairs in the 3D physics engine. diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml deleted file mode 100644 index bb31f03c18..0000000000 --- a/doc/classes/PhysicalBone.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml new file mode 100644 index 0000000000..d45c72ee87 --- /dev/null +++ b/doc/classes/PhysicalBone3D.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index 705c063257..89b43158dc 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -5,7 +5,7 @@ The [PhysicalSkyMaterial] uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the [ProceduralSkyMaterial], but it is slightly slower and less flexible. - The [PhysicalSkyMaterial] only supports one sun. The color, energy, and direction of the sun are taken from the first [DirectionalLight] in the scene tree. + The [PhysicalSkyMaterial] only supports one sun. The color, energy, and direction of the sun are taken from the first [DirectionalLight3D] in the scene tree. As it is based on a daylight model, the sky fades to black as the sunset ends. If you want a full day/night cycle, you will have to add a night sky by converting this to a [ShaderMaterial] and adding a night sky directly into the resulting shader. diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml deleted file mode 100644 index d9d402ac9a..0000000000 --- a/doc/classes/Physics2DDirectBodyState.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - Direct access object to a physics body in the [Physics2DServer]. - - - Provides direct access to a physics body in the [Physics2DServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. - - - https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html - - - - - - - - - Adds a constant directional force without affecting rotation. - - - - - - - - - - - Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. - - - - - - - - - Adds a constant rotational force. - - - - - - - - - Applies a directional impulse without affecting rotation. - - - - - - - - - - - Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. - - - - - - - - - Applies a rotational impulse to the body. - - - - - - - - - Returns the collider's [RID]. - - - - - - - - - Returns the collider's object id. - - - - - - - - - Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). - - - - - - - - - Returns the contact position in the collider. - - - - - - - - - Returns the collider's shape index. - - - - - - - - - Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - - - - - - - - - Returns the linear velocity vector at the collider's contact point. - - - - - - - Returns the number of contacts this body has with other bodies. - [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. - - - - - - - - - Returns the local normal at the contact point. - - - - - - - - - Returns the local position of the contact point. - - - - - - - - - Returns the local shape index of the collision. - - - - - - - Returns the current state of the space, useful for queries. - - - - - - - Calls the built-in force integration code. - - - - - - The body's rotational velocity. - - - The inverse of the inertia of the body. - - - The inverse of the mass of the body. - - - The body's linear velocity. - - - If [code]true[/code], this body is currently sleeping (not active). - - - The timestep (delta) used for the simulation. - - - The rate at which the body stops rotating, if there are not any other forces moving it. - - - The total gravity vector being currently applied to this body. - - - The rate at which the body stops moving, if there are not any other forces moving it. - - - The body's transformation matrix. - - - - - diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml deleted file mode 100644 index 11f1140ca8..0000000000 --- a/doc/classes/Physics2DDirectBodyStateSW.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Software implementation of [Physics2DDirectBodyState]. - - - Software implementation of [Physics2DDirectBodyState]. This object exposes no new methods or properties and should not be used, as [Physics2DDirectBodyState] selects the best implementation available. - - - - - - - - diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml deleted file mode 100644 index 662a823d84..0000000000 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - Direct access object to a space in the [Physics2DServer]. - - - Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space. - - - https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html - - - - - - - - - Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty. - [b]Note:[/b] Both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. - - - - - - - - - - - Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. - - - - - - - - - Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. - [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields: - [code]collider_id[/code]: The colliding object's ID. - [code]linear_velocity[/code]: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is [code](0, 0)[/code]. - [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - [code]normal[/code]: The object's surface normal at the intersection point. - [code]point[/code]: The intersection point. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - - - - - - - - - - - - - - - - - - - Checks whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: - [code]collider[/code]: The colliding object. - [code]collider_id[/code]: The colliding object's ID. - [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Intersects a ray in a given space. The returned object is a dictionary with the following fields: - [code]collider[/code]: The colliding object. - [code]collider_id[/code]: The colliding object's ID. - [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - [code]normal[/code]: The object's surface normal at the intersection point. - [code]position[/code]: The intersection point. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively. - - - - - - - - - - - Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. - [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: - [code]collider[/code]: The colliding object. - [code]collider_id[/code]: The colliding object's ID. - [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. - - - - - - diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml deleted file mode 100644 index 45215253be..0000000000 --- a/doc/classes/Physics2DServer.xml +++ /dev/null @@ -1,1284 +0,0 @@ - - - - Server interface for low-level 2D physics access. - - - Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. - - - - - - - - - - - - - - - - - Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - - - - - - - - - - - - - - - - - - - - - Assigns the area to a descendant of [Object], so it can exist in the node tree. - - - - - - - - - Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. - - - - - - - Creates an [Area2D]. - - - - - - - - - - - - - - - - - Gets the instance ID of the object the area is assigned to. - - - - - - - - - - - Returns an area parameter value. See [enum AreaParameter] for a list of available parameters. - - - - - - - - - - - Returns the [RID] of the nth shape of an area. - - - - - - - - - Returns the number of shapes assigned to an area. - - - - - - - - - - - Returns the transform matrix of a shape within an area. - - - - - - - - - Returns the space assigned to the area. - - - - - - - - - Returns the space override mode for the area. - - - - - - - - - Returns the transform matrix for an area. - - - - - - - - - - - Removes a shape from an area. It does not delete the shape, so it can be reassigned later. - - - - - - - - - - - - - - - - - - - - - - - Assigns the area to one or many physics layers. - - - - - - - - - - - Sets which physics layers the area will monitor. - - - - - - - - - - - - - Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. - 2: [RID] of the object that entered/exited the area. - 3: Instance ID of the object that entered/exited the area. - 4: The shape index of the object that entered/exited the area. - 5: The shape index of the area where the object entered/exited. - - - - - - - - - - - - - - - - - - - - - - - Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters. - - - - - - - - - - - - - Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. - - - - - - - - - - - - - Disables a given shape in an area. - - - - - - - - - - - - - Sets the transform matrix for an area shape. - - - - - - - - - - - Assigns a space to the area. - - - - - - - - - - - Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes. - - - - - - - - - - - Sets the transform matrix for an area. - - - - - - - - - - - - - - - - - - - - - Adds a body to the list of bodies exempt from collisions. - - - - - - - - - - - - - Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. - - - - - - - - - - - - - - - Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Assigns the area to a descendant of [Object], so it can exist in the node tree. - - - - - - - - - Removes all shapes from a body. - - - - - - - Creates a physics body. - - - - - - - - - - - - - - - - - Returns the physics layer or layers a body belongs to. - - - - - - - - - Returns the physics layer or layers a body can collide with. - - - - - - - - - Returns the continuous collision detection mode. - - - - - - - - - Returns the [Physics2DDirectBodyState] of the body. - - - - - - - - - Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. - - - - - - - - - Returns the body mode. - - - - - - - - - Gets the instance ID of the object the area is assigned to. - - - - - - - - - - - Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters. - - - - - - - - - - - Returns the [RID] of the nth shape of a body. - - - - - - - - - Returns the number of shapes assigned to a body. - - - - - - - - - - - Returns the metadata of a shape of a body. - - - - - - - - - - - Returns the transform matrix of a body shape. - - - - - - - - - Returns the [RID] of the space assigned to a body. - - - - - - - - - - - Returns a body state. - - - - - - - - - Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). - - - - - - - - - - - Removes a body from the list of bodies exempt from collisions. - - - - - - - - - - - Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. - - - - - - - - - - - Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. - - - - - - - - - - - Sets the physics layer or layers a body belongs to. - - - - - - - - - - - Sets the physics layer or layers a body can collide with. - - - - - - - - - - - Sets the continuous collision detection mode using one of the [enum CCDMode] constants. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. - - - - - - - - - - - - - - - Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). - - - - - - - - - - - Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - - - - - - - - - Sets the body mode using one of the [enum BodyMode] constants. - - - - - - - - - - - Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). - - - - - - - - - - - - - Sets a body parameter. See [enum BodyParameter] for a list of available parameters. - - - - - - - - - - - - - Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. - - - - - - - - - - - - - - - Enables one way collision on body if [code]enable[/code] is [code]true[/code]. - - - - - - - - - - - - - Disables shape in body if [code]disable[/code] is [code]true[/code]. - - - - - - - - - - - - - Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. - - - - - - - - - - - - - Sets the transform matrix for a body shape. - - - - - - - - - - - Assigns a space to the body (see [method space_create]). - - - - - - - - - - - - - Sets a body state using one of the [enum BodyState] constants. - - - - - - - - - - - - - - - - - - - Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [Physics2DTestMotionResult] can be passed to return additional information in. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. - - - - - - - - - - - Returns the value of a damped spring joint parameter. - - - - - - - - - - - - - Sets a damped spring joint parameter. See [enum DampedStringParam] for a list of available parameters. - - - - - - - - - Destroys any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. - - - - - - - - - Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states. - - - - - - - - - - - - - - - - - Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself. - - - - - - - - - - - Returns the value of a joint parameter. - - - - - - - - - Returns a joint's type (see [enum JointType]). - - - - - - - - - - - - - Sets a joint parameter. See [enum JointParam] for a list of available parameters. - - - - - - - - - - - - - - - - - - - Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. - - - - - - - - - - - - - - - - - - - - - - - - - - - Activates or deactivates the 2D physics engine. - - - - - - - - - Returns the shape data. - - - - - - - - - Returns a shape's type (see [enum ShapeType]). - - - - - - - - - - - Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. - - - - - - - Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. - - - - - - - - - Returns the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries. - - - - - - - - - - - Returns the value of a space parameter. - - - - - - - - - Returns whether the space is active. - - - - - - - - - - - Marks a space as active. It will not have an effect, unless it is assigned to an area or body. - - - - - - - - - - - - - Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters. - - - - - - Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. - - - Constant to set/get the maximum distance a shape can be from another before they are considered separated. - - - Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. - - - Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. - - - Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. - - - Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. - - - Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. - - - - - This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. - - - - - This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. - - - This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. - - - This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. - - - This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. - - - This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. - - - This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. - - - This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. - - - Constant to set/get gravity strength in an area. - - - Constant to set/get gravity vector/center in an area. - - - Constant to set/get whether the gravity vector of an area is a direction, or a center point. - - - Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. - - - This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. - - - Constant to set/get the linear dampening factor of an area. - - - Constant to set/get the angular dampening factor of an area. - - - Constant to set/get the priority (order of processing) of an area. - - - This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. - - - This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. - - - This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. - - - This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. - - - This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - Constant for static bodies. - - - Constant for kinematic bodies. - - - Constant for rigid bodies. - - - Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. - - - Constant to set/get a body's bounce factor. - - - Constant to set/get a body's friction. - - - Constant to set/get a body's mass. - - - Constant to set/get a body's inertia. - - - Constant to set/get a body's gravity multiplier. - - - Constant to set/get a body's linear dampening factor. - - - Constant to set/get a body's angular dampening factor. - - - Represents the size of the [enum BodyParameter] enum. - - - Constant to set/get the current transform matrix of the body. - - - Constant to set/get the current linear velocity of the body. - - - Constant to set/get the current angular velocity of the body. - - - Constant to sleep/wake up a body, or to get whether it is sleeping. - - - Constant to set/get whether the body can sleep. - - - Constant to create pin joints. - - - Constant to create groove joints. - - - Constant to create damped spring joints. - - - - - - - - - Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. - - - Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. - - - Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). - - - Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. - - - Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. - - - Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. - - - The value of the first parameter and area callback function receives, when an object enters one of its shapes. - - - The value of the first parameter and area callback function receives, when an object exits one of its shapes. - - - Constant to get the number of objects that are not sleeping. - - - Constant to get the number of possible collisions. - - - Constant to get the number of space regions where a collision could occur. - - - diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml deleted file mode 100644 index 1e4531ed66..0000000000 --- a/doc/classes/Physics2DServerSW.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - Software implementation of [Physics2DServer]. - - - This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available. - - - - - - - - diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml deleted file mode 100644 index 392ccbd10a..0000000000 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - Parameters to be sent to a 2D shape physics query. - - - This class contains the shape and other parameters for 2D intersection/collision queries. See also [Physics2DShapeQueryResult]. - - - - - - - - - - - Sets the [Shape2D] that will be used for collision/intersection queries. - - - - - - If [code]true[/code], the query will take [Area2D]s into account. - - - If [code]true[/code], the query will take [PhysicsBody2D]s into account. - - - The physics layer(s) the query will take into account (as a bitmask). - - - The list of objects or object [RID]s that will be excluded from collisions. - - - The collision margin for the shape. - - - The motion of the shape being queried for. - - - The queried shape's [RID]. See also [method set_shape]. - - - The queried shape's transform matrix. - - - - - diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml deleted file mode 100644 index 359a716bee..0000000000 --- a/doc/classes/Physics2DShapeQueryResult.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - Result of a 2D shape query in [Physics2DServer]. - - - The result of a 2D shape query in [Physics2DServer]. See also [Physics2DShapeQueryParameters]. - - - - - - - - - Returns the number of objects that intersected with the shape. - - - - - - - - - Returns the [Object] that intersected with the shape at index [code]idx[/code]. - - - - - - - - - Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. - - - - - - - - - Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. - - - - - - - - - Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. - - - - - - diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml deleted file mode 100644 index 9e8c03580f..0000000000 --- a/doc/classes/Physics2DTestMotionResult.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml deleted file mode 100644 index c0927a5b53..0000000000 --- a/doc/classes/PhysicsBody.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - Base class for all objects affected by physics in 3D space. - - - PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it. - - - https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html - - - - - - - - - Adds a body to the list of bodies that this body can't collide with. - - - - - - - Returns an array of nodes that were added as collision exceptions for this body. - - - - - - - - - Returns an individual bit on the [member collision_layer]. - - - - - - - - - Returns an individual bit on the [member collision_mask]. - - - - - - - - - Removes a body from the list of bodies that this body can't collide with. - - - - - - - - - - - Sets individual bits on the [member collision_layer] bitmask. Use this if you only need to change one layer's value. - - - - - - - - - - - Sets individual bits on the [member collision_mask] bitmask. Use this if you only need to change one layer's value. - - - - - - The physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - - - The physics layers this area scans for collisions. - - - - - diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml new file mode 100644 index 0000000000..f0ba2a7f5f --- /dev/null +++ b/doc/classes/PhysicsBody3D.xml @@ -0,0 +1,91 @@ + + + + Base class for all objects affected by physics in 3D space. + + + PhysicsBody3D is an abstract base class for implementing a physics body. All *Body types inherit from it. + + + https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html + + + + + + + + + Adds a body to the list of bodies that this body can't collide with. + + + + + + + Returns an array of nodes that were added as collision exceptions for this body. + + + + + + + + + Returns an individual bit on the [member collision_layer]. + + + + + + + + + Returns an individual bit on the [member collision_mask]. + + + + + + + + + Removes a body from the list of bodies that this body can't collide with. + + + + + + + + + + + Sets individual bits on the [member collision_layer] bitmask. Use this if you only need to change one layer's value. + + + + + + + + + + + Sets individual bits on the [member collision_mask] bitmask. Use this if you only need to change one layer's value. + + + + + + The physics layers this area is in. + Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + + + The physics layers this area scans for collisions. + + + + + diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml deleted file mode 100644 index 24cf4961be..0000000000 --- a/doc/classes/PhysicsDirectBodyState.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - Direct access object to a physics body in the [PhysicsServer]. - - - Provides direct access to a physics body in the [PhysicsServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody._integrate_forces]. - - - - - - - - - - - Adds a constant directional force without affecting rotation. - This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. - - - - - - - - - - - Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. - - - - - - - - - Adds a constant rotational force without affecting position. - - - - - - - - - Applies a single directional impulse without affecting rotation. - This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code]. - - - - - - - - - - - Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. - - - - - - - - - Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter. - - - - - - - - - Returns the collider's [RID]. - - - - - - - - - Returns the collider's object id. - - - - - - - - - Returns the collider object. - - - - - - - - - Returns the contact position in the collider. - - - - - - - - - Returns the collider's shape index. - - - - - - - - - Returns the linear velocity vector at the collider's contact point. - - - - - - - Returns the number of contacts this body has with other bodies. - [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody.contact_monitor]. - - - - - - - - - Impulse created by the contact. Only implemented for Bullet physics. - - - - - - - - - Returns the local normal at the contact point. - - - - - - - - - Returns the local position of the contact point. - - - - - - - - - Returns the local shape index of the collision. - - - - - - - Returns the current state of the space, useful for queries. - - - - - - - Calls the built-in force integration code. - - - - - - The body's rotational velocity. - - - - - The inverse of the inertia of the body. - - - The inverse of the mass of the body. - - - The body's linear velocity. - - - - - If [code]true[/code], this body is currently sleeping (not active). - - - The timestep (delta) used for the simulation. - - - The rate at which the body stops rotating, if there are not any other forces moving it. - - - The total gravity vector being currently applied to this body. - - - The rate at which the body stops moving, if there are not any other forces moving it. - - - The body's transformation matrix. - - - - - diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml new file mode 100644 index 0000000000..46205fecd1 --- /dev/null +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -0,0 +1,218 @@ + + + + Direct access object to a physics body in the [PhysicsServer2D]. + + + Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. + + + https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html + + + + + + + + + Adds a constant directional force without affecting rotation. + + + + + + + + + + + Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. + + + + + + + + + Adds a constant rotational force. + + + + + + + + + Applies a directional impulse without affecting rotation. + + + + + + + + + + + Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. + + + + + + + + + Applies a rotational impulse to the body. + + + + + + + + + Returns the collider's [RID]. + + + + + + + + + Returns the collider's object id. + + + + + + + + + Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). + + + + + + + + + Returns the contact position in the collider. + + + + + + + + + Returns the collider's shape index. + + + + + + + + + Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + + + + + + + + + Returns the linear velocity vector at the collider's contact point. + + + + + + + Returns the number of contacts this body has with other bodies. + [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. + + + + + + + + + Returns the local normal at the contact point. + + + + + + + + + Returns the local position of the contact point. + + + + + + + + + Returns the local shape index of the collision. + + + + + + + Returns the current state of the space, useful for queries. + + + + + + + Calls the built-in force integration code. + + + + + + The body's rotational velocity. + + + The inverse of the inertia of the body. + + + The inverse of the mass of the body. + + + The body's linear velocity. + + + If [code]true[/code], this body is currently sleeping (not active). + + + The timestep (delta) used for the simulation. + + + The rate at which the body stops rotating, if there are not any other forces moving it. + + + The total gravity vector being currently applied to this body. + + + The rate at which the body stops moving, if there are not any other forces moving it. + + + The body's transformation matrix. + + + + + diff --git a/doc/classes/PhysicsDirectBodyState2DSW.xml b/doc/classes/PhysicsDirectBodyState2DSW.xml new file mode 100644 index 0000000000..94fc4213b7 --- /dev/null +++ b/doc/classes/PhysicsDirectBodyState2DSW.xml @@ -0,0 +1,15 @@ + + + + Software implementation of [PhysicsDirectBodyState2D]. + + + Software implementation of [PhysicsDirectBodyState2D]. This object exposes no new methods or properties and should not be used, as [PhysicsDirectBodyState2D] selects the best implementation available. + + + + + + + + diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml new file mode 100644 index 0000000000..1ee520fe5f --- /dev/null +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -0,0 +1,223 @@ + + + + Direct access object to a physics body in the [PhysicsServer3D]. + + + Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces]. + + + + + + + + + + + Adds a constant directional force without affecting rotation. + This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. + + + + + + + + + + + Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. + + + + + + + + + Adds a constant rotational force without affecting position. + + + + + + + + + Applies a single directional impulse without affecting rotation. + This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code]. + + + + + + + + + + + Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. + + + + + + + + + Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter. + + + + + + + + + Returns the collider's [RID]. + + + + + + + + + Returns the collider's object id. + + + + + + + + + Returns the collider object. + + + + + + + + + Returns the contact position in the collider. + + + + + + + + + Returns the collider's shape index. + + + + + + + + + Returns the linear velocity vector at the collider's contact point. + + + + + + + Returns the number of contacts this body has with other bodies. + [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor]. + + + + + + + + + Impulse created by the contact. Only implemented for Bullet physics. + + + + + + + + + Returns the local normal at the contact point. + + + + + + + + + Returns the local position of the contact point. + + + + + + + + + Returns the local shape index of the collision. + + + + + + + Returns the current state of the space, useful for queries. + + + + + + + Calls the built-in force integration code. + + + + + + The body's rotational velocity. + + + + + The inverse of the inertia of the body. + + + The inverse of the mass of the body. + + + The body's linear velocity. + + + + + If [code]true[/code], this body is currently sleeping (not active). + + + The timestep (delta) used for the simulation. + + + The rate at which the body stops rotating, if there are not any other forces moving it. + + + The total gravity vector being currently applied to this body. + + + The rate at which the body stops moving, if there are not any other forces moving it. + + + The body's transformation matrix. + + + + + diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml deleted file mode 100644 index a6172805e9..0000000000 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - Direct access object to a space in the [PhysicsServer]. - - - Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space. - - - https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html - - - - - - - - - - - Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. - If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics. - - - - - - - - - - - Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. - - - - - - - - - Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: - [code]collider_id[/code]: The colliding object's ID. - [code]linear_velocity[/code]: The colliding object's velocity [Vector3]. If the object is an [Area], the result is [code](0, 0, 0)[/code]. - [code]normal[/code]: The object's surface normal at the intersection point. - [code]point[/code]: The intersection point. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - If the shape did not intersect anything, then an empty dictionary is returned instead. - - - - - - - - - - - - - - - - - - - Intersects a ray in a given space. The returned object is a dictionary with the following fields: - [code]collider[/code]: The colliding object. - [code]collider_id[/code]: The colliding object's ID. - [code]normal[/code]: The object's surface normal at the intersection point. - [code]position[/code]: The intersection point. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively. - - - - - - - - - - - Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: - [code]collider[/code]: The colliding object. - [code]collider_id[/code]: The colliding object's ID. - [code]rid[/code]: The intersecting object's [RID]. - [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. - - - - - - diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml new file mode 100644 index 0000000000..d85d7794dd --- /dev/null +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -0,0 +1,145 @@ + + + + Direct access object to a space in the [PhysicsServer2D]. + + + Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space. + + + https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html + + + + + + + + + Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty. + [b]Note:[/b] Both the shape and the motion are supplied through a [PhysicsShapeQueryParameters2D] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. + + + + + + + + + + + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. + + + + + + + + + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. + [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields: + [code]collider_id[/code]: The colliding object's ID. + [code]linear_velocity[/code]: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is [code](0, 0)[/code]. + [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + [code]normal[/code]: The object's surface normal at the intersection point. + [code]point[/code]: The intersection point. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + + + + + + + + + + + + + + + + + + + Checks whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Intersects a ray in a given space. The returned object is a dictionary with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + [code]normal[/code]: The object's surface normal at the intersection point. + [code]position[/code]: The intersection point. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + If the ray did not intersect anything, then an empty dictionary is returned instead. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + + + + + + + + + + + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. + [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. + + + + + + diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml new file mode 100644 index 0000000000..09ee93732d --- /dev/null +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -0,0 +1,98 @@ + + + + Direct access object to a space in the [PhysicsServer3D]. + + + Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space. + + + https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html + + + + + + + + + + + Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. + If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics. + + + + + + + + + + + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. + + + + + + + + + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: + [code]collider_id[/code]: The colliding object's ID. + [code]linear_velocity[/code]: The colliding object's velocity [Vector3]. If the object is an [Area3D], the result is [code](0, 0, 0)[/code]. + [code]normal[/code]: The object's surface normal at the intersection point. + [code]point[/code]: The intersection point. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + If the shape did not intersect anything, then an empty dictionary is returned instead. + + + + + + + + + + + + + + + + + + + Intersects a ray in a given space. The returned object is a dictionary with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]normal[/code]: The object's surface normal at the intersection point. + [code]position[/code]: The intersection point. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + If the ray did not intersect anything, then an empty dictionary is returned instead. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. + + + + + + + + + + + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. + + + + + + diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index 84e7f2b275..6410626496 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -4,7 +4,7 @@ A material for physics properties. - Provides a means of modifying the collision properties of a [PhysicsBody]. + Provides a means of modifying the collision properties of a [PhysicsBody3D]. diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml deleted file mode 100644 index 1b9ce80a1b..0000000000 --- a/doc/classes/PhysicsServer.xml +++ /dev/null @@ -1,1639 +0,0 @@ - - - - Server interface for low-level physics access. - - - PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. - - - - - - - - - - - - - - - - - Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - - - - - - - - - - - Assigns the area to a descendant of [Object], so it can exist in the node tree. - - - - - - - - - Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. - - - - - - - Creates an [Area]. - - - - - - - - - Gets the instance ID of the object the area is assigned to. - - - - - - - - - - - Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants. - - - - - - - - - - - Returns the [RID] of the nth shape of an area. - - - - - - - - - Returns the number of shapes assigned to an area. - - - - - - - - - - - Returns the transform matrix of a shape within an area. - - - - - - - - - Returns the space assigned to the area. - - - - - - - - - Returns the space override mode for the area. - - - - - - - - - Returns the transform matrix for an area. - - - - - - - - - If [code]true[/code], area collides with rays. - - - - - - - - - - - Removes a shape from an area. It does not delete the shape, so it can be reassigned later. - - - - - - - - - - - - - - - - - - - - - - - Assigns the area to one or many physics layers. - - - - - - - - - - - Sets which physics layers the area will monitor. - - - - - - - - - - - - - Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. - 2: [RID] of the object that entered/exited the area. - 3: Instance ID of the object that entered/exited the area. - 4: The shape index of the object that entered/exited the area. - 5: The shape index of the area where the object entered/exited. - - - - - - - - - - - - - - - - - - - - - - - Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants. - - - - - - - - - - - Sets object pickable with rays. - - - - - - - - - - - - - Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. - - - - - - - - - - - - - - - - - - - - - - - - - Sets the transform matrix for an area shape. - - - - - - - - - - - Assigns a space to the area. - - - - - - - - - - - Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants. - - - - - - - - - - - Sets the transform matrix for an area. - - - - - - - - - - - - - - - - - - - - - Adds a body to the list of bodies exempt from collisions. - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code]. - - - - - - - - - - - Gives the body a push to rotate it. - - - - - - - - - - - Assigns the area to a descendant of [Object], so it can exist in the node tree. - - - - - - - - - Removes all shapes from a body. - - - - - - - - - - - Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. - - - - - - - - - Returns the physics layer or layers a body belongs to. - - - - - - - - - Returns the physics layer or layers a body can collide with. -- - - - - - - - - - Returns the [PhysicsDirectBodyState] of the body. - - - - - - - - - - - - - - - - - Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. - - - - - - - - - Returns the body mode. - - - - - - - - - Gets the instance ID of the object the area is assigned to. - - - - - - - - - - - Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants. - - - - - - - - - - - Returns the [RID] of the nth shape of a body. - - - - - - - - - Returns the number of shapes assigned to a body. - - - - - - - - - - - Returns the transform matrix of a body shape. - - - - - - - - - Returns the [RID] of the space assigned to a body. - - - - - - - - - - - Returns a body state. - - - - - - - - - - - - - - - - - - - If [code]true[/code], the continuous collision detection mode is enabled. - - - - - - - - - Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). - - - - - - - - - If [code]true[/code], the body can be detected by rays. - - - - - - - - - - - Removes a body from the list of bodies exempt from collisions. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. - - - - - - - - - - - Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. - - - - - - - - - - - - - - - - - - - - - - - Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. - - - - - - - - - - - Sets the physics layer or layers a body belongs to. - - - - - - - - - - - Sets the physics layer or layers a body can collide with. - - - - - - - - - - - If [code]true[/code], the continuous collision detection mode is enabled. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. - - - - - - - - - - - - - - - Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). - - - - - - - - - - - - - - - - - - - - - Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - - - - - - - - - Sets the body mode, from one of the [enum BodyMode] constants. - - - - - - - - - - - Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). - - - - - - - - - - - - - Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. - - - - - - - - - - - Sets the body pickable with rays if [code]enabled[/code] is set. - - - - - - - - - - - - - Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. - - - - - - - - - - - - - - - - - - - - - - - - - Sets the transform matrix for a body shape. - - - - - - - - - - - Assigns a space to the body (see [method space_create]). - - - - - - - - - - - - - Sets a body state (see [enum BodyState] constants). - - - - - - - - - - - Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). - - - - - - - - - - - - - Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). - - - - - - - - - Destroys any of the objects created by PhysicsServer. If the [RID] passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console. - - - - - - - - - - - - - Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). - - - - - - - - - - - - - Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). - - - - - - - - - - - - - - - Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). - - - - - - - - - - - - - - - Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). - - - - - - - - - Returns an Info defined by the [enum ProcessInfo] input given. - - - - - - - - - - - Gets a hinge_joint flag (see [enum HingeJointFlag] constants). - - - - - - - - - - - Gets a hinge_joint parameter (see [enum HingeJointParam]). - - - - - - - - - - - - - Sets a hinge_joint flag (see [enum HingeJointFlag] constants). - - - - - - - - - - - - - Sets a hinge_joint parameter (see [enum HingeJointParam] constants). - - - - - - - - - - - - - - - Creates a [ConeTwistJoint]. - - - - - - - - - - - - - - - Creates a [Generic6DOFJoint]. - - - - - - - - - - - - - - - Creates a [HingeJoint]. - - - - - - - - - - - - - - - Creates a [PinJoint]. - - - - - - - - - - - - - - - Creates a [SliderJoint]. - - - - - - - - - Gets the priority value of the Joint. - - - - - - - - - Returns the type of the Joint. - - - - - - - - - - - Sets the priority value of the Joint. - - - - - - - - - Returns position of the joint in the local space of body a of the joint. - - - - - - - - - Returns position of the joint in the local space of body b of the joint. - - - - - - - - - - - Gets a pin_joint parameter (see [enum PinJointParam] constants). - - - - - - - - - - - Sets position of the joint in the local space of body a of the joint. - - - - - - - - - - - Sets position of the joint in the local space of body b of the joint. - - - - - - - - - - - - - Sets a pin_joint parameter (see [enum PinJointParam] constants). - - - - - - - - - Activates or deactivates the 3D physics engine. - - - - - - - - - Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. - - - - - - - - - Returns the shape data. - - - - - - - - - Returns the type of shape (see [enum ShapeType] constants). - - - - - - - - - - - Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. - - - - - - - - - - - Gets a slider_joint parameter (see [enum SliderJointParam] constants). - - - - - - - - - - - - - Gets a slider_joint parameter (see [enum SliderJointParam] constants). - - - - - - - Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. - - - - - - - - - Returns the state of a space, a [PhysicsDirectSpaceState]. This object can be used to make collision/intersection queries. - - - - - - - - - - - Returns the value of a space parameter. - - - - - - - - - Returns whether the space is active. - - - - - - - - - - - Marks a space as active. It will not have an effect, unless it is assigned to an area or body. - - - - - - - - - - - - - Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. - - - - - - The [Joint] is a [PinJoint]. - - - The [Joint] is a [HingeJoint]. - - - The [Joint] is a [SliderJoint]. - - - The [Joint] is a [ConeTwistJoint]. - - - The [Joint] is a [Generic6DOFJoint]. - - - The strength with which the pinned objects try to stay in positional relation to each other. - The higher, the stronger. - - - The strength with which the pinned objects try to stay in velocity relation to each other. - The higher, the stronger. - - - If above 0, this value is the maximum value for an impulse that this Joint puts on its ends. - - - The speed with which the two bodies get pulled together when they move in different directions. - - - The maximum rotation across the Hinge. - - - The minimum rotation across the Hinge. - - - The speed with which the rotation across the axis perpendicular to the hinge gets corrected. - - - - - The lower this value, the more the rotation gets slowed down. - - - Target speed for the motor. - - - Maximum acceleration for the motor. - - - If [code]true[/code], the Hinge has a maximum and a minimum rotation. - - - If [code]true[/code], a motor turns the Hinge. - - - The maximum difference between the pivot points on their X axis before damping happens. - - - The minimum difference between the pivot points on their X axis before damping happens. - - - A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. - - - The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. - - - The amount of damping once the slider limits are surpassed. - - - A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. - - - The amount of restitution inside the slider limits. - - - The amount of damping inside the slider limits. - - - A factor applied to the movement across axes orthogonal to the slider. - - - The amount of restitution when movement is across axes orthogonal to the slider. - - - The amount of damping when movement is across axes orthogonal to the slider. - - - The upper limit of rotation in the slider. - - - The lower limit of rotation in the slider. - - - A factor applied to the all rotation once the limit is surpassed. - - - The amount of restitution of the rotation when the limit is surpassed. - - - The amount of damping of the rotation when the limit is surpassed. - - - A factor that gets applied to the all rotation in the limits. - - - The amount of restitution of the rotation in the limits. - - - The amount of damping of the rotation in the limits. - - - A factor that gets applied to the all rotation across axes orthogonal to the slider. - - - The amount of restitution of the rotation across axes orthogonal to the slider. - - - The amount of damping of the rotation across axes orthogonal to the slider. - - - Represents the size of the [enum SliderJointParam] enum. - - - Swing is rotation from side to side, around the axis perpendicular to the twist axis. - The swing span defines, how much rotation will not get corrected along the swing axis. - Could be defined as looseness in the [ConeTwistJoint]. - If below 0.05, this behavior is locked. - - - Twist is the rotation around the twist axis, this value defined how far the joint can twist. - Twist is locked if below 0.05. - - - The speed with which the swing or twist will take place. - The higher, the faster. - - - The ease with which the Joint twists, if it's too low, it takes more force to twist the joint. - - - Defines, how fast the swing- and twist-speed-difference on both sides gets synced. - - - The minimum difference between the pivot points' axes. - - - The maximum difference between the pivot points' axes. - - - A factor that gets applied to the movement across the axes. The lower, the slower the movement. - - - The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. - - - The amount of damping that happens at the linear motion across the axes. - - - The velocity that the joint's linear motor will attempt to reach. - - - The maximum force that the linear motor can apply while trying to reach the target velocity. - - - The minimum rotation in negative direction to break loose and rotate around the axes. - - - The minimum rotation in positive direction to break loose and rotate around the axes. - - - A factor that gets multiplied onto all rotations across the axes. - - - The amount of rotational damping across the axes. The lower, the more dampening occurs. - - - The amount of rotational restitution across the axes. The lower, the more restitution occurs. - - - The maximum amount of force that can occur, when rotating around the axes. - - - When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - - - Target speed for the motor at the axes. - - - Maximum acceleration for the motor at the axes. - - - If [code]set[/code] there is linear motion possible within the given limits. - - - If [code]set[/code] there is rotational motion possible. - - - If [code]set[/code] there is a rotational motor across these axes. - - - If [code]set[/code] there is a linear motor on this axis that targets a specific velocity. - - - The [Shape] is a [WorldMarginShape]. - - - The [Shape] is a [RayShape]. - - - The [Shape] is a [SphereShape]. - - - The [Shape] is a [BoxShape]. - - - The [Shape] is a [CapsuleShape]. - - - The [Shape] is a [CylinderShape]. - - - The [Shape] is a [ConvexPolygonShape]. - - - The [Shape] is a [ConcavePolygonShape]. - - - The [Shape] is a [HeightMapShape]. - - - This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. - - - Constant to set/get gravity strength in an area. - - - Constant to set/get gravity vector/center in an area. - - - Constant to set/get whether the gravity vector of an area is a direction, or a center point. - - - Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. - - - This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. - - - Constant to set/get the linear dampening factor of an area. - - - Constant to set/get the angular dampening factor of an area. - - - Constant to set/get the priority (order of processing) of an area. - - - This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. - - - This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. - - - This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. - - - This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. - - - This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. - - - Constant for static bodies. - - - Constant for kinematic bodies. - - - Constant for rigid bodies. - - - Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. - - - Constant to set/get a body's bounce factor. - - - Constant to set/get a body's friction. - - - Constant to set/get a body's mass. - - - Constant to set/get a body's gravity multiplier. - - - Constant to set/get a body's linear dampening factor. - - - Constant to set/get a body's angular dampening factor. - - - Represents the size of the [enum BodyParameter] enum. - - - Constant to set/get the current transform matrix of the body. - - - Constant to set/get the current linear velocity of the body. - - - Constant to set/get the current angular velocity of the body. - - - Constant to sleep/wake up a body, or to get whether it is sleeping. - - - Constant to set/get whether the body can sleep. - - - The value of the first parameter and area callback function receives, when an object enters one of its shapes. - - - The value of the first parameter and area callback function receives, when an object exits one of its shapes. - - - Constant to get the number of objects that are not sleeping. - - - Constant to get the number of possible collisions. - - - Constant to get the number of space regions where a collision could occur. - - - Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. - - - Constant to set/get the maximum distance a shape can be from another before they are considered separated. - - - Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. - - - Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. - - - Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. - - - Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. - - - - - Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. - - - - - - - - - - - - - - - - - diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml new file mode 100644 index 0000000000..9da739e57a --- /dev/null +++ b/doc/classes/PhysicsServer2D.xml @@ -0,0 +1,1284 @@ + + + + Server interface for low-level 2D physics access. + + + PhysicsServer2D is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. + + + + + + + + + + + + + + + + + Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + + + + + + + + + + + + + + + + + + + + + Assigns the area to a descendant of [Object], so it can exist in the node tree. + + + + + + + + + Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. + + + + + + + Creates an [Area2D]. + + + + + + + + + + + + + + + + + Gets the instance ID of the object the area is assigned to. + + + + + + + + + + + Returns an area parameter value. See [enum AreaParameter] for a list of available parameters. + + + + + + + + + + + Returns the [RID] of the nth shape of an area. + + + + + + + + + Returns the number of shapes assigned to an area. + + + + + + + + + + + Returns the transform matrix of a shape within an area. + + + + + + + + + Returns the space assigned to the area. + + + + + + + + + Returns the space override mode for the area. + + + + + + + + + Returns the transform matrix for an area. + + + + + + + + + + + Removes a shape from an area. It does not delete the shape, so it can be reassigned later. + + + + + + + + + + + + + + + + + + + + + + + Assigns the area to one or many physics layers. + + + + + + + + + + + Sets which physics layers the area will monitor. + + + + + + + + + + + + + Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. + 2: [RID] of the object that entered/exited the area. + 3: Instance ID of the object that entered/exited the area. + 4: The shape index of the object that entered/exited the area. + 5: The shape index of the area where the object entered/exited. + + + + + + + + + + + + + + + + + + + + + + + Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters. + + + + + + + + + + + + + Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. + + + + + + + + + + + + + Disables a given shape in an area. + + + + + + + + + + + + + Sets the transform matrix for an area shape. + + + + + + + + + + + Assigns a space to the area. + + + + + + + + + + + Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes. + + + + + + + + + + + Sets the transform matrix for an area. + + + + + + + + + + + + + + + + + + + + + Adds a body to the list of bodies exempt from collisions. + + + + + + + + + + + + + Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. + + + + + + + + + + + + + + + Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Assigns the area to a descendant of [Object], so it can exist in the node tree. + + + + + + + + + Removes all shapes from a body. + + + + + + + Creates a physics body. + + + + + + + + + + + + + + + + + Returns the physics layer or layers a body belongs to. + + + + + + + + + Returns the physics layer or layers a body can collide with. + + + + + + + + + Returns the continuous collision detection mode. + + + + + + + + + Returns the [PhysicsDirectBodyState2D] of the body. + + + + + + + + + Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. + + + + + + + + + Returns the body mode. + + + + + + + + + Gets the instance ID of the object the area is assigned to. + + + + + + + + + + + Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters. + + + + + + + + + + + Returns the [RID] of the nth shape of a body. + + + + + + + + + Returns the number of shapes assigned to a body. + + + + + + + + + + + Returns the metadata of a shape of a body. + + + + + + + + + + + Returns the transform matrix of a body shape. + + + + + + + + + Returns the [RID] of the space assigned to a body. + + + + + + + + + + + Returns a body state. + + + + + + + + + Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + + + + + + + + + + + Removes a body from the list of bodies exempt from collisions. + + + + + + + + + + + Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. + + + + + + + + + + + Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + + + + + + + + + + + Sets the physics layer or layers a body belongs to. + + + + + + + + + + + Sets the physics layer or layers a body can collide with. + + + + + + + + + + + Sets the continuous collision detection mode using one of the [enum CCDMode] constants. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + + + + + + + + + + + + + + + Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + + + + + + + + + + + Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + + + + + + + + + Sets the body mode using one of the [enum BodyMode] constants. + + + + + + + + + + + Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + + + + + + + + + + + + + Sets a body parameter. See [enum BodyParameter] for a list of available parameters. + + + + + + + + + + + + + Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. + + + + + + + + + + + + + + + Enables one way collision on body if [code]enable[/code] is [code]true[/code]. + + + + + + + + + + + + + Disables shape in body if [code]disable[/code] is [code]true[/code]. + + + + + + + + + + + + + Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. + + + + + + + + + + + + + Sets the transform matrix for a body shape. + + + + + + + + + + + Assigns a space to the body (see [method space_create]). + + + + + + + + + + + + + Sets a body state using one of the [enum BodyState] constants. + + + + + + + + + + + + + + + + + + + Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. + + + + + + + + + + + Returns the value of a damped spring joint parameter. + + + + + + + + + + + + + Sets a damped spring joint parameter. See [enum DampedStringParam] for a list of available parameters. + + + + + + + + + Destroys any of the objects created by PhysicsServer2D. If the [RID] passed is not one of the objects that can be created by PhysicsServer2D, an error will be sent to the console. + + + + + + + + + Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states. + + + + + + + + + + + + + + + + + Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself. + + + + + + + + + + + Returns the value of a joint parameter. + + + + + + + + + Returns a joint's type (see [enum JointType]). + + + + + + + + + + + + + Sets a joint parameter. See [enum JointParam] for a list of available parameters. + + + + + + + + + + + + + + + + + + + Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. + + + + + + + + + + + + + + + + + + + + + + + + + + + Activates or deactivates the 2D physics engine. + + + + + + + + + Returns the shape data. + + + + + + + + + Returns a shape's type (see [enum ShapeType]). + + + + + + + + + + + Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. + + + + + + + Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. + + + + + + + + + Returns the state of a space, a [PhysicsDirectSpaceState2D]. This object can be used to make collision/intersection queries. + + + + + + + + + + + Returns the value of a space parameter. + + + + + + + + + Returns whether the space is active. + + + + + + + + + + + Marks a space as active. It will not have an effect, unless it is assigned to an area or body. + + + + + + + + + + + + + Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters. + + + + + + Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + + + Constant to set/get the maximum distance a shape can be from another before they are considered separated. + + + Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + + + Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + + + Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + + + Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + + + Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. + + + + + This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. + + + + + This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. + + + This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. + + + This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. + + + This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. + + + This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. + + + This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. + + + This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + + + Constant to set/get gravity strength in an area. + + + Constant to set/get gravity vector/center in an area. + + + Constant to set/get whether the gravity vector of an area is a direction, or a center point. + + + Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + + + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. + + + Constant to set/get the linear dampening factor of an area. + + + Constant to set/get the angular dampening factor of an area. + + + Constant to set/get the priority (order of processing) of an area. + + + This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + + + This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + + + This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + + + This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + + + This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + Constant for static bodies. + + + Constant for kinematic bodies. + + + Constant for rigid bodies. + + + Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + + + Constant to set/get a body's bounce factor. + + + Constant to set/get a body's friction. + + + Constant to set/get a body's mass. + + + Constant to set/get a body's inertia. + + + Constant to set/get a body's gravity multiplier. + + + Constant to set/get a body's linear dampening factor. + + + Constant to set/get a body's angular dampening factor. + + + Represents the size of the [enum BodyParameter] enum. + + + Constant to set/get the current transform matrix of the body. + + + Constant to set/get the current linear velocity of the body. + + + Constant to set/get the current angular velocity of the body. + + + Constant to sleep/wake up a body, or to get whether it is sleeping. + + + Constant to set/get whether the body can sleep. + + + Constant to create pin joints. + + + Constant to create groove joints. + + + Constant to create damped spring joints. + + + + + + + + + Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + + + Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + + + Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). + + + Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + + + Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. + + + Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. + + + The value of the first parameter and area callback function receives, when an object enters one of its shapes. + + + The value of the first parameter and area callback function receives, when an object exits one of its shapes. + + + Constant to get the number of objects that are not sleeping. + + + Constant to get the number of possible collisions. + + + Constant to get the number of space regions where a collision could occur. + + + diff --git a/doc/classes/PhysicsServer2DSW.xml b/doc/classes/PhysicsServer2DSW.xml new file mode 100644 index 0000000000..dac5e360f0 --- /dev/null +++ b/doc/classes/PhysicsServer2DSW.xml @@ -0,0 +1,15 @@ + + + + Software implementation of [PhysicsServer2D]. + + + This class exposes no new methods or properties and should not be used, as [PhysicsServer2D] automatically selects the best implementation available. + + + + + + + + diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml new file mode 100644 index 0000000000..e9e1552c92 --- /dev/null +++ b/doc/classes/PhysicsServer3D.xml @@ -0,0 +1,1639 @@ + + + + Server interface for low-level physics access. + + + PhysicsServer3D is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. + + + + + + + + + + + + + + + + + Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + + + + + + + + + + + Assigns the area to a descendant of [Object], so it can exist in the node tree. + + + + + + + + + Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. + + + + + + + Creates an [Area3D]. + + + + + + + + + Gets the instance ID of the object the area is assigned to. + + + + + + + + + + + Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants. + + + + + + + + + + + Returns the [RID] of the nth shape of an area. + + + + + + + + + Returns the number of shapes assigned to an area. + + + + + + + + + + + Returns the transform matrix of a shape within an area. + + + + + + + + + Returns the space assigned to the area. + + + + + + + + + Returns the space override mode for the area. + + + + + + + + + Returns the transform matrix for an area. + + + + + + + + + If [code]true[/code], area collides with rays. + + + + + + + + + + + Removes a shape from an area. It does not delete the shape, so it can be reassigned later. + + + + + + + + + + + + + + + + + + + + + + + Assigns the area to one or many physics layers. + + + + + + + + + + + Sets which physics layers the area will monitor. + + + + + + + + + + + + + Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. + 2: [RID] of the object that entered/exited the area. + 3: Instance ID of the object that entered/exited the area. + 4: The shape index of the object that entered/exited the area. + 5: The shape index of the area where the object entered/exited. + + + + + + + + + + + + + + + + + + + + + + + Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants. + + + + + + + + + + + Sets object pickable with rays. + + + + + + + + + + + + + Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. + + + + + + + + + + + + + + + + + + + + + + + + + Sets the transform matrix for an area shape. + + + + + + + + + + + Assigns a space to the area. + + + + + + + + + + + Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants. + + + + + + + + + + + Sets the transform matrix for an area. + + + + + + + + + + + + + + + + + + + + + Adds a body to the list of bodies exempt from collisions. + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code]. + + + + + + + + + + + Gives the body a push to rotate it. + + + + + + + + + + + Assigns the area to a descendant of [Object], so it can exist in the node tree. + + + + + + + + + Removes all shapes from a body. + + + + + + + + + + + Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + + + + + + + + + Returns the physics layer or layers a body belongs to. + + + + + + + + + Returns the physics layer or layers a body can collide with. +- + + + + + + + + + Returns the [PhysicsDirectBodyState3D] of the body. + + + + + + + + + + + + + + + + + Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. + + + + + + + + + Returns the body mode. + + + + + + + + + Gets the instance ID of the object the area is assigned to. + + + + + + + + + + + Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants. + + + + + + + + + + + Returns the [RID] of the nth shape of a body. + + + + + + + + + Returns the number of shapes assigned to a body. + + + + + + + + + + + Returns the transform matrix of a body shape. + + + + + + + + + Returns the [RID] of the space assigned to a body. + + + + + + + + + + + Returns a body state. + + + + + + + + + + + + + + + + + + + If [code]true[/code], the continuous collision detection mode is enabled. + + + + + + + + + Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + + + + + + + + + If [code]true[/code], the body can be detected by rays. + + + + + + + + + + + Removes a body from the list of bodies exempt from collisions. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + + + + + + + + + + + Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. + + + + + + + + + + + + + + + + + + + + + + + Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + + + + + + + + + + + Sets the physics layer or layers a body belongs to. + + + + + + + + + + + Sets the physics layer or layers a body can collide with. + + + + + + + + + + + If [code]true[/code], the continuous collision detection mode is enabled. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + + + + + + + + + + + + + + + Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + + + + + + + + + + + + + + + + + + + + + Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + + + + + + + + + Sets the body mode, from one of the [enum BodyMode] constants. + + + + + + + + + + + Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + + + + + + + + + + + + + Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. + + + + + + + + + + + Sets the body pickable with rays if [code]enabled[/code] is set. + + + + + + + + + + + + + Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. + + + + + + + + + + + + + + + + + + + + + + + + + Sets the transform matrix for a body shape. + + + + + + + + + + + Assigns a space to the body (see [method space_create]). + + + + + + + + + + + + + Sets a body state (see [enum BodyState] constants). + + + + + + + + + + + Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). + + + + + + + + + + + + + Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). + + + + + + + + + Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. + + + + + + + + + + + + + Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). + + + + + + + + + + + + + Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). + + + + + + + + + + + + + + + Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). + + + + + + + + + + + + + + + Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). + + + + + + + + + Returns an Info defined by the [enum ProcessInfo] input given. + + + + + + + + + + + Gets a hinge_joint flag (see [enum HingeJointFlag] constants). + + + + + + + + + + + Gets a hinge_joint parameter (see [enum HingeJointParam]). + + + + + + + + + + + + + Sets a hinge_joint flag (see [enum HingeJointFlag] constants). + + + + + + + + + + + + + Sets a hinge_joint parameter (see [enum HingeJointParam] constants). + + + + + + + + + + + + + + + Creates a [ConeTwistJoint3D]. + + + + + + + + + + + + + + + Creates a [Generic6DOFJoint3D]. + + + + + + + + + + + + + + + Creates a [HingeJoint3D]. + + + + + + + + + + + + + + + Creates a [PinJoint3D]. + + + + + + + + + + + + + + + Creates a [SliderJoint3D]. + + + + + + + + + Gets the priority value of the Joint3D. + + + + + + + + + Returns the type of the Joint3D. + + + + + + + + + + + Sets the priority value of the Joint3D. + + + + + + + + + Returns position of the joint in the local space of body a of the joint. + + + + + + + + + Returns position of the joint in the local space of body b of the joint. + + + + + + + + + + + Gets a pin_joint parameter (see [enum PinJointParam] constants). + + + + + + + + + + + Sets position of the joint in the local space of body a of the joint. + + + + + + + + + + + Sets position of the joint in the local space of body b of the joint. + + + + + + + + + + + + + Sets a pin_joint parameter (see [enum PinJointParam] constants). + + + + + + + + + Activates or deactivates the 3D physics engine. + + + + + + + + + Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + + + + + + + + + Returns the shape data. + + + + + + + + + Returns the type of shape (see [enum ShapeType] constants). + + + + + + + + + + + Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. + + + + + + + + + + + Gets a slider_joint parameter (see [enum SliderJointParam] constants). + + + + + + + + + + + + + Gets a slider_joint parameter (see [enum SliderJointParam] constants). + + + + + + + Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. + + + + + + + + + Returns the state of a space, a [PhysicsDirectSpaceState3D]. This object can be used to make collision/intersection queries. + + + + + + + + + + + Returns the value of a space parameter. + + + + + + + + + Returns whether the space is active. + + + + + + + + + + + Marks a space as active. It will not have an effect, unless it is assigned to an area or body. + + + + + + + + + + + + + Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. + + + + + + The [Joint3D] is a [PinJoint3D]. + + + The [Joint3D] is a [HingeJoint3D]. + + + The [Joint3D] is a [SliderJoint3D]. + + + The [Joint3D] is a [ConeTwistJoint3D]. + + + The [Joint3D] is a [Generic6DOFJoint3D]. + + + The strength with which the pinned objects try to stay in positional relation to each other. + The higher, the stronger. + + + The strength with which the pinned objects try to stay in velocity relation to each other. + The higher, the stronger. + + + If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends. + + + The speed with which the two bodies get pulled together when they move in different directions. + + + The maximum rotation across the Hinge. + + + The minimum rotation across the Hinge. + + + The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + + + + + The lower this value, the more the rotation gets slowed down. + + + Target speed for the motor. + + + Maximum acceleration for the motor. + + + If [code]true[/code], the Hinge has a maximum and a minimum rotation. + + + If [code]true[/code], a motor turns the Hinge. + + + The maximum difference between the pivot points on their X axis before damping happens. + + + The minimum difference between the pivot points on their X axis before damping happens. + + + A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + + + The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. + + + The amount of damping once the slider limits are surpassed. + + + A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + + + The amount of restitution inside the slider limits. + + + The amount of damping inside the slider limits. + + + A factor applied to the movement across axes orthogonal to the slider. + + + The amount of restitution when movement is across axes orthogonal to the slider. + + + The amount of damping when movement is across axes orthogonal to the slider. + + + The upper limit of rotation in the slider. + + + The lower limit of rotation in the slider. + + + A factor applied to the all rotation once the limit is surpassed. + + + The amount of restitution of the rotation when the limit is surpassed. + + + The amount of damping of the rotation when the limit is surpassed. + + + A factor that gets applied to the all rotation in the limits. + + + The amount of restitution of the rotation in the limits. + + + The amount of damping of the rotation in the limits. + + + A factor that gets applied to the all rotation across axes orthogonal to the slider. + + + The amount of restitution of the rotation across axes orthogonal to the slider. + + + The amount of damping of the rotation across axes orthogonal to the slider. + + + Represents the size of the [enum SliderJointParam] enum. + + + Swing is rotation from side to side, around the axis perpendicular to the twist axis. + The swing span defines, how much rotation will not get corrected along the swing axis. + Could be defined as looseness in the [ConeTwistJoint3D]. + If below 0.05, this behavior is locked. + + + Twist is the rotation around the twist axis, this value defined how far the joint can twist. + Twist is locked if below 0.05. + + + The speed with which the swing or twist will take place. + The higher, the faster. + + + The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint. + + + Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + + + The minimum difference between the pivot points' axes. + + + The maximum difference between the pivot points' axes. + + + A factor that gets applied to the movement across the axes. The lower, the slower the movement. + + + The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. + + + The amount of damping that happens at the linear motion across the axes. + + + The velocity that the joint's linear motor will attempt to reach. + + + The maximum force that the linear motor can apply while trying to reach the target velocity. + + + The minimum rotation in negative direction to break loose and rotate around the axes. + + + The minimum rotation in positive direction to break loose and rotate around the axes. + + + A factor that gets multiplied onto all rotations across the axes. + + + The amount of rotational damping across the axes. The lower, the more dampening occurs. + + + The amount of rotational restitution across the axes. The lower, the more restitution occurs. + + + The maximum amount of force that can occur, when rotating around the axes. + + + When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + + + Target speed for the motor at the axes. + + + Maximum acceleration for the motor at the axes. + + + If [code]set[/code] there is linear motion possible within the given limits. + + + If [code]set[/code] there is rotational motion possible. + + + If [code]set[/code] there is a rotational motor across these axes. + + + If [code]set[/code] there is a linear motor on this axis that targets a specific velocity. + + + The [Shape3D] is a [WorldMarginShape3D]. + + + The [Shape3D] is a [RayShape3D]. + + + The [Shape3D] is a [SphereShape3D]. + + + The [Shape3D] is a [BoxShape3D]. + + + The [Shape3D] is a [CapsuleShape3D]. + + + The [Shape3D] is a [CylinderShape3D]. + + + The [Shape3D] is a [ConvexPolygonShape3D]. + + + The [Shape3D] is a [ConcavePolygonShape3D]. + + + The [Shape3D] is a [HeightMapShape3D]. + + + This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + + + Constant to set/get gravity strength in an area. + + + Constant to set/get gravity vector/center in an area. + + + Constant to set/get whether the gravity vector of an area is a direction, or a center point. + + + Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + + + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. + + + Constant to set/get the linear dampening factor of an area. + + + Constant to set/get the angular dampening factor of an area. + + + Constant to set/get the priority (order of processing) of an area. + + + This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + + + This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + + + This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + + + This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + + + This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + + + Constant for static bodies. + + + Constant for kinematic bodies. + + + Constant for rigid bodies. + + + Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + + + Constant to set/get a body's bounce factor. + + + Constant to set/get a body's friction. + + + Constant to set/get a body's mass. + + + Constant to set/get a body's gravity multiplier. + + + Constant to set/get a body's linear dampening factor. + + + Constant to set/get a body's angular dampening factor. + + + Represents the size of the [enum BodyParameter] enum. + + + Constant to set/get the current transform matrix of the body. + + + Constant to set/get the current linear velocity of the body. + + + Constant to set/get the current angular velocity of the body. + + + Constant to sleep/wake up a body, or to get whether it is sleeping. + + + Constant to set/get whether the body can sleep. + + + The value of the first parameter and area callback function receives, when an object enters one of its shapes. + + + The value of the first parameter and area callback function receives, when an object exits one of its shapes. + + + Constant to get the number of objects that are not sleeping. + + + Constant to get the number of possible collisions. + + + Constant to get the number of space regions where a collision could occur. + + + Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + + + Constant to set/get the maximum distance a shape can be from another before they are considered separated. + + + Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + + + Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + + + Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + + + Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + + + + + Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml deleted file mode 100644 index 829a1d1bf0..0000000000 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - Parameters to be sent to a 3D shape physics query. - - - This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult]. - - - - - - - - - - - Sets the [Shape] that will be used for collision/intersection queries. - - - - - - If [code]true[/code], the query will take [Area]s into account. - - - If [code]true[/code], the query will take [PhysicsBody]s into account. - - - The physics layer(s) the query will take into account (as a bitmask). - - - The list of objects or object [RID]s that will be excluded from collisions. - - - The collision margin for the shape. - - - The queried shape's [RID]. See also [method set_shape]. - - - The queried shape's transform matrix. - - - - - diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml new file mode 100644 index 0000000000..9a162dabbb --- /dev/null +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -0,0 +1,50 @@ + + + + Parameters to be sent to a 2D shape physics query. + + + This class contains the shape and other parameters for 2D intersection/collision queries. See also [PhysicsShapeQueryResult2D]. + + + + + + + + + + + Sets the [Shape2D] that will be used for collision/intersection queries. + + + + + + If [code]true[/code], the query will take [Area2D]s into account. + + + If [code]true[/code], the query will take [PhysicsBody2D]s into account. + + + The physics layer(s) the query will take into account (as a bitmask). + + + The list of objects or object [RID]s that will be excluded from collisions. + + + The collision margin for the shape. + + + The motion of the shape being queried for. + + + The queried shape's [RID]. See also [method set_shape]. + + + The queried shape's transform matrix. + + + + + diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml new file mode 100644 index 0000000000..6606cfbc59 --- /dev/null +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -0,0 +1,47 @@ + + + + Parameters to be sent to a 3D shape physics query. + + + This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult3D]. + + + + + + + + + + + Sets the [Shape3D] that will be used for collision/intersection queries. + + + + + + If [code]true[/code], the query will take [Area3D]s into account. + + + If [code]true[/code], the query will take [PhysicsBody3D]s into account. + + + The physics layer(s) the query will take into account (as a bitmask). + + + The list of objects or object [RID]s that will be excluded from collisions. + + + The collision margin for the shape. + + + The queried shape's [RID]. See also [method set_shape]. + + + The queried shape's transform matrix. + + + + + diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml deleted file mode 100644 index ea6dc2c39e..0000000000 --- a/doc/classes/PhysicsShapeQueryResult.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - Result of a 3D shape query in [PhysicsServer]. - - - The result of a 3D shape query in [PhysicsServer]. See also [PhysicsShapeQueryParameters]. - - - - - - - - - Returns the number of objects that intersected with the shape. - - - - - - - - - Returns the [Object] that intersected with the shape at index [code]idx[/code]. - - - - - - - - - Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. - - - - - - - - - Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. - - - - - - - - - Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. - - - - - - diff --git a/doc/classes/PhysicsShapeQueryResult2D.xml b/doc/classes/PhysicsShapeQueryResult2D.xml new file mode 100644 index 0000000000..227683cc33 --- /dev/null +++ b/doc/classes/PhysicsShapeQueryResult2D.xml @@ -0,0 +1,58 @@ + + + + Result of a 2D shape query in [PhysicsServer2D]. + + + The result of a 2D shape query in [PhysicsServer2D]. See also [PhysicsShapeQueryParameters2D]. + + + + + + + + + Returns the number of objects that intersected with the shape. + + + + + + + + + Returns the [Object] that intersected with the shape at index [code]idx[/code]. + + + + + + + + + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. + + + + + + + + + Returns the child index of the object's [Shape2D] that intersected with the shape at index [code]idx[/code]. + + + + + + + + + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. + + + + + + diff --git a/doc/classes/PhysicsShapeQueryResult3D.xml b/doc/classes/PhysicsShapeQueryResult3D.xml new file mode 100644 index 0000000000..4555c4e242 --- /dev/null +++ b/doc/classes/PhysicsShapeQueryResult3D.xml @@ -0,0 +1,58 @@ + + + + Result of a 3D shape query in [PhysicsServer3D]. + + + The result of a 3D shape query in [PhysicsServer3D]. See also [PhysicsShapeQueryParameters3D]. + + + + + + + + + Returns the number of objects that intersected with the shape. + + + + + + + + + Returns the [Object] that intersected with the shape at index [code]idx[/code]. + + + + + + + + + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. + + + + + + + + + Returns the child index of the object's [Shape3D] that intersected with the shape at index [code]idx[/code]. + + + + + + + + + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. + + + + + + diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml new file mode 100644 index 0000000000..301cff2885 --- /dev/null +++ b/doc/classes/PhysicsTestMotionResult2D.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml deleted file mode 100644 index 78cab4805e..0000000000 --- a/doc/classes/PinJoint.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - Pin joint for 3D shapes. - - - Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. - - - - - - - - - - - Returns the value of the specified parameter. - - - - - - - - - - - Sets the value of the specified parameter. - - - - - - The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. - - - The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. - - - If above 0, this value is the maximum value for an impulse that this Joint produces. - - - - - The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. - - - The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. - - - If above 0, this value is the maximum value for an impulse that this Joint produces. - - - diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index 020babdf40..42155a7f25 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -1,10 +1,10 @@ - Pin Joint for 2D shapes. + Pin joint for 2D shapes. - Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together. + Pin joint for 2D rigid bodies. It pins two bodies (rigid or static) together. diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml new file mode 100644 index 0000000000..0af1e60839 --- /dev/null +++ b/doc/classes/PinJoint3D.xml @@ -0,0 +1,55 @@ + + + + Pin joint for 3D shapes. + + + Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. + + + + + + + + + + + Returns the value of the specified parameter. + + + + + + + + + + + Sets the value of the specified parameter. + + + + + + The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. + + + The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + + + If above 0, this value is the maximum value for an impulse that this Joint3D produces. + + + + + The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. + + + The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + + + If above 0, this value is the maximum value for an impulse that this Joint3D produces. + + + diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml index 6dce8a91c6..ca61a57483 100644 --- a/doc/classes/Position3D.xml +++ b/doc/classes/Position3D.xml @@ -1,10 +1,10 @@ - + Generic 3D position hint for editing. - Generic 3D position hint for editing. It's just like a plain [Spatial], but it displays as a cross in the 3D editor at all times. + Generic 3D position hint for editing. It's just like a plain [Node3D], but it displays as a cross in the 3D editor at all times. diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index dec0cbc120..70e82d248c 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -1,12 +1,12 @@ - A [Material] used with [Sky] to generate a background based on user input parameters. + A [Material] used with [Sky] to generate a background based on user input parameters. ProceduralSkyMaterial provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. The [ProceduralSkyMaterial] uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option. - The [ProceduralSkyMaterial] supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding [DirectionalLight] in the scene. + The [ProceduralSkyMaterial] supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding [DirectionalLight3D] in the scene. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 79d5ffa2e7..121e55c87e 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -898,7 +898,7 @@ [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: [codeblock] # Set the default gravity strength to 98. - Physics2DServer.area_set_param(get_viewport().find_world_2d().get_space(), Physics2DServer.AREA_PARAM_GRAVITY, 98) + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY, 98) [/codeblock] @@ -906,7 +906,7 @@ [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: [codeblock] # Set the default gravity direction to `Vector2(0, 1)`. - Physics2DServer.area_set_param(get_viewport().find_world_2d().get_space(), Physics2DServer.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1)) + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1)) [/codeblock] @@ -920,20 +920,20 @@ "DEFAULT" and "GodotPhysics" are the same, as there is currently no alternative 2D physics server implemented. - Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant Physics2DServer.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD]. + Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD]. - Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant Physics2DServer.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD]. + Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD]. Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process. [b]Warning:[/b] As of Godot 3.2, there are mixed reports about the use of a Multi-Threaded thread model for physics. Be sure to assess whether it does give you extra performance and no regressions when using it. - Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant Physics2DServer.SPACE_PARAM_BODY_TIME_TO_SLEEP]. + Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP]. - Sets whether the 3D physics world will be created with support for [SoftBody] physics. Only applies to the Bullet physics engine. + Sets whether the 3D physics world will be created with support for [SoftBody3D] physics. Only applies to the Bullet physics engine. The default angular damp in 3D. @@ -943,7 +943,7 @@ [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: [codeblock] # Set the default gravity strength to 9.8. - PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, 9.8) + PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) [/codeblock] @@ -951,7 +951,7 @@ [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: [codeblock] # Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0)) + PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0)) [/codeblock] @@ -973,7 +973,7 @@ [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. - Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color]. + Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml deleted file mode 100644 index dee1a3daf0..0000000000 --- a/doc/classes/ProximityGroup.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - General-purpose proximity detection node. - - - General-purpose proximity detection node. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml new file mode 100644 index 0000000000..1714c1ec8d --- /dev/null +++ b/doc/classes/ProximityGroup3D.xml @@ -0,0 +1,47 @@ + + + + General-purpose proximity detection node. + + + General-purpose proximity detection node. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 77c608fccb..644c427120 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -4,7 +4,7 @@ Handle for a [Resource]'s unique ID. - The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer]. + The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [RenderingServer]. diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml deleted file mode 100644 index 65f632ba74..0000000000 --- a/doc/classes/RayCast.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - Query the closest object intersecting a ray. - - - A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray. - RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code] or by setting proper filtering with collision layers and masks. - RayCast can be configured to report collisions with [Area]s ([member collide_with_areas]) and/or [PhysicsBody]s ([member collide_with_bodies]). - Only enabled raycasts will be able to query the space and report collisions. - RayCast calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast. - - - https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html - - - - - - - - - Adds a collision exception so the ray does not report collisions with the specified node. - - - - - - - - - Adds a collision exception so the ray does not report collisions with the specified [RID]. - - - - - - - Removes all collision exceptions for this ray. - - - - - - - Updates the collision information for the ray. - Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. - [b]Note:[/b] [code]enabled == true[/code] is not required for this to work. - - - - - - - Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). - - - - - - - Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). - - - - - - - - - Returns [code]true[/code] if the bit index passed is turned on. - [b]Note:[/b] Bit indices range from 0-19. - - - - - - - Returns the normal of the intersecting object's shape at the collision point. - - - - - - - Returns the collision point at which the ray intersects the closest object. - [b]Note:[/b] This point is in the [b]global[/b] coordinate system. - - - - - - - Returns whether any object is intersecting with the ray's vector (considering the vector length). - - - - - - - - - Removes a collision exception so the ray does report collisions with the specified node. - - - - - - - - - Removes a collision exception so the ray does report collisions with the specified [RID]. - - - - - - - - - - - Sets the bit index passed to the [code]value[/code] passed. - [b]Note:[/b] Bit indexes range from 0-19. - - - - - - The ray's destination point, relative to the RayCast's [code]position[/code]. - - - If [code]true[/code], collision with [Area]s will be reported. - - - If [code]true[/code], collision with [PhysicsBody]s will be reported. - - - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. - - - If [code]true[/code], collisions will be reported. - - - If [code]true[/code], collisions will be ignored for this RayCast's immediate parent. - - - - - diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml new file mode 100644 index 0000000000..08c6d6f40c --- /dev/null +++ b/doc/classes/RayCast3D.xml @@ -0,0 +1,150 @@ + + + + Query the closest object intersecting a ray. + + + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray. + RayCast3D can ignore some objects by adding them to the exception list via [code]add_exception[/code] or by setting proper filtering with collision layers and masks. + RayCast3D can be configured to report collisions with [Area3D]s ([member collide_with_areas]) and/or [PhysicsBody3D]s ([member collide_with_bodies]). + Only enabled raycasts will be able to query the space and report collisions. + RayCast3D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast. + + + https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html + + + + + + + + + Adds a collision exception so the ray does not report collisions with the specified node. + + + + + + + + + Adds a collision exception so the ray does not report collisions with the specified [RID]. + + + + + + + Removes all collision exceptions for this ray. + + + + + + + Updates the collision information for the ray. + Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. + [b]Note:[/b] [code]enabled == true[/code] is not required for this to work. + + + + + + + Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). + + + + + + + Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). + + + + + + + + + Returns [code]true[/code] if the bit index passed is turned on. + [b]Note:[/b] Bit indices range from 0-19. + + + + + + + Returns the normal of the intersecting object's shape at the collision point. + + + + + + + Returns the collision point at which the ray intersects the closest object. + [b]Note:[/b] This point is in the [b]global[/b] coordinate system. + + + + + + + Returns whether any object is intersecting with the ray's vector (considering the vector length). + + + + + + + + + Removes a collision exception so the ray does report collisions with the specified node. + + + + + + + + + Removes a collision exception so the ray does report collisions with the specified [RID]. + + + + + + + + + + + Sets the bit index passed to the [code]value[/code] passed. + [b]Note:[/b] Bit indexes range from 0-19. + + + + + + The ray's destination point, relative to the RayCast's [code]position[/code]. + + + If [code]true[/code], collision with [Area3D]s will be reported. + + + If [code]true[/code], collision with [PhysicsBody3D]s will be reported. + + + The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. + + + If [code]true[/code], collisions will be reported. + + + If [code]true[/code], collisions will be ignored for this RayCast3D's immediate parent. + + + + + diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml deleted file mode 100644 index 87a642f779..0000000000 --- a/doc/classes/RayShape.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Ray shape for 3D collisions. - - - Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - - - - - - - - The ray's length. - - - If [code]true[/code], allow the shape to return the correct normal. - - - - - diff --git a/doc/classes/RayShape3D.xml b/doc/classes/RayShape3D.xml new file mode 100644 index 0000000000..9839044c30 --- /dev/null +++ b/doc/classes/RayShape3D.xml @@ -0,0 +1,23 @@ + + + + Ray shape for 3D collisions. + + + Ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + + + + + + + + The ray's length. + + + If [code]true[/code], allow the shape to return the correct normal. + + + + + diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index e138af6841..84f87c3e71 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -1,5 +1,5 @@ - + Captures its surroundings to create reflections. @@ -17,7 +17,7 @@ If [code]true[/code], enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. - Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost. + Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance3D] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost. If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode]. diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml deleted file mode 100644 index feb6ac1841..0000000000 --- a/doc/classes/RemoteTransform.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - RemoteTransform pushes its own [Transform] to another [Spatial] derived Node in the scene. - - - RemoteTransform pushes its own [Transform] to another [Spatial] derived Node (called the remote node) in the scene. - It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. - - - - - - - - - [RemoteTransform] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again. - - - - - - The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene. - - - If [code]true[/code], the remote node's position is updated. - - - If [code]true[/code], the remote node's rotation is updated. - - - If [code]true[/code], the remote node's scale is updated. - - - If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. - - - - - diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml new file mode 100644 index 0000000000..bd3da2aea9 --- /dev/null +++ b/doc/classes/RemoteTransform3D.xml @@ -0,0 +1,40 @@ + + + + RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node in the scene. + + + RemoteTransform3D pushes its own [Transform] to another [Node3D] derived Node (called the remote node) in the scene. + It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. + + + + + + + + + [RemoteTransform3D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again. + + + + + + The [NodePath] to the remote node, relative to the RemoteTransform3D's position in the scene. + + + If [code]true[/code], the remote node's position is updated. + + + If [code]true[/code], the remote node's rotation is updated. + + + If [code]true[/code], the remote node's scale is updated. + + + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. + + + + + diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml new file mode 100644 index 0000000000..7127ba8b71 --- /dev/null +++ b/doc/classes/RenderingServer.xml @@ -0,0 +1,3737 @@ + + + + Server for anything visible. + + + Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. + The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + The visual server can be used to bypass the scene system entirely. + Resources are created using the [code]*_create[/code] functions. + All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. + In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Node3D] node with [method Node3D.get_world]. Otherwise, a scenario can be created with [method scenario_create]. + Similarly in 2D, a canvas is needed to draw all canvas items. + In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. + In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. + + + https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html + + + + + + + + + + + + + + + Sets images to be rendered in the window margin. + + + + + + + + + + + + + + + Sets margin size, where black bars (or images, if [method black_bars_set_images] was used) are rendered. + + + + + + + Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera3D.cull_mask]. + + + + + + + + + + + Sets the environment used by this camera. Equivalent to [member Camera3D.environment]. + + + + + + + + + + + + + + + + + Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. + + + + + + + + + + + + + + + Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. + + + + + + + + + + + + + + + Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. + + + + + + + + + + + Sets [Transform] of camera. + + + + + + + + + + + If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera3D.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera3D.KEEP_HEIGHT]. + + + + + + + Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + Clears the [CanvasItem] and removes all commands in it. + + + + + + + + + + + + + Sets the [CanvasItem] to copy a rect to the backbuffer. + + + + + + + + + + + Sets the index for the [CanvasItem]. + + + + + + + + + + + Sets a new material to the [CanvasItem]. + + + + + + + + + + + Sets if the [CanvasItem] uses its parent's material. + + + + + + + + + + + If this is enabled, the Z index of the parent will be added to the children's Z index. + + + + + + + + + + + Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first). + + + + + + + + + + + Attaches the canvas light to the canvas. Removes it from its previous canvas. + + + + + + + Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Attaches a light occluder to the canvas. Removes it from its previous canvas. + + + + + + + Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Enables or disables light occluder. + + + + + + + + + + + The light mask. See [LightOccluder2D] for more information on light masks. + + + + + + + + + + + Sets a light occluder's polygon. + + + + + + + + + + + Sets a light occluder's [Transform2D]. + + + + + + + + + + + Sets the color for a light. + + + + + + + + + + + Enables or disables a canvas light. + + + + + + + + + + + Sets a canvas light's energy. + + + + + + + + + + + Sets a canvas light's height. + + + + + + + + + + + The light mask. See [LightOccluder2D] for more information on light masks. + + + + + + + + + + + The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks. + + + + + + + + + + + + + The layer range that gets rendered with this light. + + + + + + + + + + + The mode of the light, see [enum CanvasLightMode] constants. + + + + + + + + + + + Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]. + + + + + + + + + + + Sets the width of the shadow buffer, size gets scaled to the next power of two for this. + + + + + + + + + + + Sets the color of the canvas light's shadow. + + + + + + + + + + + Enables or disables the canvas light's shadow. + + + + + + + + + + + Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. + + + + + + + + + + + Smoothens the shadow. The lower, the smoother. + + + + + + + + + + + Sets texture to be used by light. Equivalent to [member Light2D.texture]. + + + + + + + + + + + Sets the offset of the light's texture. Equivalent to [member Light2D.offset]. + + + + + + + + + + + Sets the canvas light's [Transform2D]. + + + + + + + + + + + + + Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. + + + + + + + Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. + + + + + + + + + + + + + Sets the shape of the occluder polygon. + + + + + + + + + + + Sets the shape of the occluder polygon as lines. + + + + + + + + + + + + + A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2]. + + + + + + + + + + + Modulates all colors in the given canvas. + + + + + + + Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. + + + + + + + Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + + + + + + + + + Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. + + + + + + + + + + + Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). + + + + + + + + + + + Sets the intensity of the background color. + + + + + + + + + + + Sets the maximum layer to use if using Canvas background mode. + + + + + + + + + + + + + + + + + Sets the variables to be used with the scene fog. See [Environment] for more details. + + + + + + + + + + + + + + + + + + + + + Sets the variables to be used with the fog depth effect. See [Environment] for more details. + + + + + + + + + + + + + + + + + Sets the variables to be used with the fog height effect. See [Environment] for more details. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.sky]. + + + + + + + + + + + Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov]. + + + + + + + + + + + Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. + + + + + + + + + + + + + + + + + + + + + + + + + Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. + + + + + + + Removes buffers and clears testcubes. + + + + + + + + + + + Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution. + + + + + + + Synchronizes threads. + + + + + + + + + Tries to free an object in the RenderingServer. + + + + + + + + + Returns a certain information, see [enum RenderInfo] for options. + + + + + + + Returns the id of the test cube. Creates one if none exists. + + + + + + + Returns the id of the test texture. Creates one if none exists. + + + + + + + Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + + + + + + + Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + + + + + + + Returns the id of a white texture. Creates one if none exists. + + + + + + + Returns [code]true[/code] if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens. + + + + + + + + + Not yet implemented. Always returns [code]false[/code]. + + + + + + + + + Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code]. + + + + + + + + + + + + + Sets up [ImmediateGeometry3D] internals to prepare for drawing. Equivalent to [method ImmediateGeometry3D.begin]. + + + + + + + + + Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry3D.clear]. + + + + + + + + + + + Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_color]. + + + + + + + Creates an immediate geometry and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + Ends drawing the [ImmediateGeometry3D] and displays it. Equivalent to [method ImmediateGeometry3D.end]. + + + + + + + + + Returns the material assigned to the [ImmediateGeometry3D]. + + + + + + + + + + + Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_normal]. + + + + + + + + + + + Sets the material to be used to draw the [ImmediateGeometry3D]. + + + + + + + + + + + Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_tangent]. + + + + + + + + + + + Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv]. + + + + + + + + + + + Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv2]. + + + + + + + + + + + Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry3D.add_vertex]. + + + + + + + + + + + Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry3D.add_vertex]. + + + + + + + Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. + + + + + + + + + + + Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. + + + + + + + + + + + Attaches a skeleton to an instance. Removes the previous skeleton from the instance. + + + + + + + Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. + + + + + + + + + + + Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Not implemented in Godot 3.x. + + + + + + + + + + + Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow]. + + + + + + + + + + + + + + + + + Not implemented in Godot 3.x. + + + + + + + + + + + + + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. + + + + + + + + + + + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. + + + + + + + + + + + Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. + + + + + + + + + + + + + Sets the weight for a given blend shape associated with this instance. + + + + + + + + + + + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance3D.set_custom_aabb]. + + + + + + + + + + + Function not implemented in Godot 3.x. + + + + + + + + + + + Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin]. + + + + + + + + + + + Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers]. + + + + + + + + + + + Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. + + + + + + + + + + + + + Sets the material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_material]. + + + + + + + + + + + Sets the world space transform of the instance. Equivalent to [member Node3D.transform]. + + + + + + + + + + + + + Sets the lightmap to use with this instance. + + + + + + + + + + + Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible]. + + + + + + + + + + + Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + + + + + + + + + + + Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + + + + + + + + + + + + + Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + + + + + + + + + + + If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits]. + + + + + + + + + + + Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. + + + + + + + + + + + Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. + + + + + + + + + + + Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode]. + + + + + + + + + + + Sets the color of the light. Equivalent to [member Light3D.light_color]. + + + + + + + + + + + Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask]. + + + + + + + + + + + If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light3D.light_negative]. + + + + + + + + + + + + + Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light3D.set_param]. + + + + + + + + + + + Not implemented in Godot 3.x. + + + + + + + + + + + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face]. + + + + + + + + + + + If [code]true[/code], light will cast shadows. Equivalent to [member Light3D.shadow_enabled]. + + + + + + + + + + + Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color]. + + + + + + + + + + + Sets whether GI probes capture light information from this light. + + + + + + + Creates a lightmap capture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + Returns the size of the lightmap capture area. + + + + + + + + + Returns the energy multiplier used by the lightmap capture. + + + + + + + + + Returns the octree used by the lightmap capture. + + + + + + + + + Returns the cell subdivision amount used by this lightmap capture's octree. + + + + + + + + + Returns the cell transform for this lightmap capture's octree. + + + + + + + + + + + Sets the size of the area covered by the lightmap capture. + + + + + + + + + + + Sets the energy multiplier for this lightmap capture. + + + + + + + + + + + Sets the octree to be used by this lightmap capture. + + + + + + + + + + + Sets the subdivision level of this lightmap capture's octree. + + + + + + + + + + + Sets the octree cell transform for this lightmap capture's octree. + + + + + + + + + + + + + Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. + + + + + + + Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Returns the value of a certain material's parameter. + + + + + + + + + + + Sets an object's next material. + + + + + + + + + + + + + Sets a material's parameter. + + + + + + + + + + + Sets a material's render priority. + + + + + + + + + + + Sets a shader material's shader. + + + + + + + + + + + + + + + + + + + + + + + + + + + Removes all surfaces from a mesh. + + + + + + + Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + Returns a mesh's blend shape count. + + + + + + + + + Returns a mesh's blend shape mode. + + + + + + + + + Returns a mesh's custom aabb. + + + + + + + + + Returns a mesh's number of surfaces. + + + + + + + + + + + Sets a mesh's blend shape mode. + + + + + + + + + + + Sets a mesh's custom aabb. + + + + + + + + + + + Returns a mesh's surface's buffer arrays. + + + + + + + + + + + Returns a mesh's surface's arrays for blend shapes. + + + + + + + + + + + + + + + Function is unused in Godot 3.x. + + + + + + + + + + + + + Function is unused in Godot 3.x. + + + + + + + + + + + Returns a mesh's surface's material. + + + + + + + + + + + + + Sets a mesh's surface's material. + + + + + + + + + + + + + + + Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. + + + + + + + + + + + + + + + + + + + + + + + Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. + + + + + + + + + + + + + + + + + Returns the number of instances allocated for this multimesh. + + + + + + + + + Returns the RID of the mesh that will be used in drawing this multimesh. + + + + + + + + + Returns the number of visible instances for this multimesh. + + + + + + + + + + + Returns the color by which the specified instance will be modulated. + + + + + + + + + + + Returns the custom data associated with the specified instance. + + + + + + + + + + + Returns the [Transform] of the specified instance. + + + + + + + + + + + Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. + + + + + + + + + + + + + Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. + + + + + + + + + + + + + Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. + + + + + + + + + + + + + Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. + + + + + + + + + + + + + Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. + + + + + + + + + + + + + + + + + + + + + Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. + + + + + + + + + + + Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. + + + + + + + Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. + + + + + + + Creates a particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method GPUParticles3D.capture_aabb]. + + + + + + + + + Returns [code]true[/code] if particles are currently set to emitting. + + + + + + + + + Returns [code]true[/code] if particles are not emitting and particles are set to inactive. + + + + + + + + + Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. + + + + + + + + + Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart]. + + + + + + + + + + + Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount]. + + + + + + + + + + + Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member GPUParticles3D.visibility_aabb]. + + + + + + + + + + + Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member GPUParticles3D.draw_order]. + + + + + + + + + + + + + Sets the mesh to be used for the specified draw pass. Equivalent to [member GPUParticles3D.draw_pass_1], [member GPUParticles3D.draw_pass_2], [member GPUParticles3D.draw_pass_3], and [member GPUParticles3D.draw_pass_4]. + + + + + + + + + + + Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes]. + + + + + + + + + + + Sets the [Transform] that will be used by the particles when they first emit. + + + + + + + + + + + If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member GPUParticles3D.emitting]. + + + + + + + + + + + Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness]. + + + + + + + + + + + Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member GPUParticles3D.fixed_fps]. + + + + + + + + + + + If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta]. + + + + + + + + + + + Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime]. + + + + + + + + + + + If [code]true[/code], particles will emit once and then stop. Equivalent to [member GPUParticles3D.one_shot]. + + + + + + + + + + + Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess]. + + + + + + + + + + + Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material]. + + + + + + + + + + + Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member GPUParticles3D.randomness]. + + + + + + + + + + + Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale]. + + + + + + + + + + + If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords]. + + + + + + + Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + + + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. + + + + + + + + + + + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. + + + + + + + + + + + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. + + + + + + + + + + + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. + + + + + + + + + + + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. + + + + + + + + + + + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. + + + + + + + + + + + Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. + + + + + + + + + + + Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. + + + + + + + + + + + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. + + + + + + + + + + + Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. + + + + + + + + + + + Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. + + + + + + + + + + + Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. + + + + + + + + + + + + + Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn. + The callback method must use only 1 argument which will be called with [code]userdata[/code]. + + + + + + + Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + The scenario is the 3D world that all the visual instances exist in. + + + + + + + + + + + Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. + + + + + + + + + + + Sets the environment that will be used with this scenario. + + + + + + + + + + + Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. + + + + + + + + + + + + + + + Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation. + + + + + + + + + If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. + + + + + + + + + Sets the default clear color which is used when a specific clear color has not been selected. + + + + + + + Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + Returns a shader's code. + + + + + + + + + + + Returns a default texture from a shader searched by name. + + + + + + + + + + + + + + + + + + + Returns the parameters of a shader. + + + + + + + + + + + Sets a shader's code. + + + + + + + + + + + + + Sets a shader's default texture. Overwrites the texture given by name. + + + + + + + + + + + + + Allocates the GPU buffers for this skeleton. + + + + + + + + + + + Returns the [Transform] set for a specific bone of this skeleton. + + + + + + + + + + + Returns the [Transform2D] set for a specific bone of this skeleton. + + + + + + + + + + + + + Sets the [Transform] for a specific bone of this skeleton. + + + + + + + + + + + + + Sets the [Transform2D] for a specific bone of this skeleton. + + + + + + + Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + Returns the number of bones allocated for this skeleton. + + + + + + + Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + + + Sets the material that the sky uses to render the background and reflection maps. + + + + + + + Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets a viewport's camera. + + + + + + + + + + + Sets a viewport's canvas. + + + + + + + + + + + + + Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. + For example, you can set the root viewport to not render at all with the following code: + [codeblock] + func _ready(): + get_viewport().set_attach_to_screen_rect(Rect2()) + $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600)) + [/codeblock] + Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen]. + + + + + + + Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + + + + + + + + + Detaches the viewport from the screen. + + + + + + + + + + + Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. + + + + + + + + + Returns the viewport's last rendered frame. + + + + + + + + + + + Detaches a viewport from a canvas and vice versa. + + + + + + + + + + + If [code]true[/code], sets the viewport active, else sets it inactive. + + + + + + + + + + + + + + + Sets the stacking order for a viewport's canvas. + [code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer. + + + + + + + + + + + + + Sets the transformation of a viewport's canvas. + + + + + + + + + + + Sets the clear mode of a viewport. See [enum ViewportClearMode] for options. + + + + + + + + + + + Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options. + + + + + + + + + + + If [code]true[/code], rendering of a viewport's environment is disabled. + + + + + + + + + + + Sets the viewport's global transformation matrix. + + + + + + + + + + + If [code]true[/code], the viewport's canvas is not rendered. + + + + + + + + + + + Currently unimplemented in Godot 3.x. + + + + + + + + + + + Sets the anti-aliasing mode. See [enum ViewportMSAA] for options. + + + + + + + + + + + Sets the viewport's parent to another viewport. + + + + + + + + + + + If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. + + + + + + + + + + + Sets a viewport's scenario. + The scenario contains information about the [enum ScenarioDebugMode], environment information, reflection atlas etc. + + + + + + + + + + + + + Sets the shadow atlas quadrant's subdivision. + + + + + + + + + + + Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. + + + + + + + + + + + + + Sets the viewport's width and height. + + + + + + + + + + + If [code]true[/code], the viewport renders its background as transparent. + + + + + + + + + + + Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options. + + + + + + + + + + + If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. + + + + + + + Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports. + + + + + Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports. + + + + + + Marks an error that shows that the index array is empty. + + + Number of weights/bones per vertex. + + + The minimum Z-layer for canvas items. + + + The maximum Z-layer for canvas items. + + + Max number of glow levels that can be used with glow post-process effect. + + + Unused enum in Godot 3.x. + + + The minimum renderpriority of all materials. + + + The maximum renderpriority of all materials. + + + + + + + + + + + + + + + + + + + + + Shader is a 3D shader. + + + Shader is a 2D shader. + + + Shader is a particle shader. + + + Shader is a sky shader. + + + Represents the size of the [enum ShaderMode] enum. + + + Array is a vertex array. + + + Array is a normal array. + + + Array is a tangent array. + + + Array is a color array. + + + Array is an UV coordinates array. + + + Array is an UV coordinates array for the second UV coordinates. + + + Array contains bone information. + + + Array is weight information. + + + Array is index array. + + + Represents the size of the [enum ArrayType] enum. + + + Flag used to mark a vertex array. + + + Flag used to mark a normal array. + + + Flag used to mark a tangent array. + + + Flag used to mark a color array. + + + Flag used to mark an UV coordinates array. + + + Flag used to mark an UV coordinates array for the second UV coordinates. + + + Flag used to mark a bone information array. + + + Flag used to mark a weights array. + + + Flag used to mark an index array. + + + Flag used to mark a compressed (half float) normal array. + + + Flag used to mark a compressed (half float) tangent array. + + + Flag used to mark a compressed (half float) color array. + + + Flag used to mark a compressed (half float) UV coordinates array. + + + Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. + + + Flag used to mark a compressed index array. + + + Flag used to mark that the array contains 2D vertices. + + + + + Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. + + + Primitive to draw consists of points. + + + Primitive to draw consists of lines. + + + Primitive to draw consists of a line strip from start to end. + + + Primitive to draw consists of triangles. + + + Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). + + + Represents the size of the [enum PrimitiveType] enum. + + + Blend shapes are normalized. + + + Blend shapes are relative to base weight. + + + Use [Transform2D] to store MultiMesh transform. + + + Use [Transform] to store MultiMesh transform. + + + Is a directional (sun) light. + + + Is an omni light. + + + Is a spot light. + + + The light's energy. + + + + + The light's influence on specularity. + + + The light's range. + + + The light's attenuation. + + + The spotlight's angle. + + + The spotlight's attenuation. + + + Scales the shadow color. + + + Max distance that shadows will be rendered. + + + Proportion of shadow atlas occupied by the first split. + + + Proportion of shadow atlas occupied by the second split. + + + Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. + + + + + Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. + + + Bias the shadow lookup to fix self-shadowing artifacts. + + + Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. + + + Represents the size of the [enum LightParam] enum. + + + Use a dual paraboloid shadow map for omni lights. + + + Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. + + + Use orthogonal shadow projection for directional light. + + + Use 2 splits for shadow projection when using directional light. + + + Use 4 splits for shadow projection when using directional light. + + + Keeps shadows stable as camera moves but has lower effective resolution. + + + Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. + + + Reflection probe will update reflections once and then stop. + + + Reflection probe will update each frame. This mode is necessary to capture moving objects. + + + Draw particles in the order that they appear in the particles array. + + + Sort particles based on their lifetime. + + + Sort particles based on their distance to the camera. + + + Do not update the viewport. + + + Update the viewport once then set to disabled. + + + Update the viewport whenever it is visible. + + + Always update the viewport. + + + The viewport is always cleared before drawing. + + + The viewport is never cleared before drawing. + + + The viewport is cleared once, then the clear mode is set to [constant VIEWPORT_CLEAR_NEVER]. + + + Multisample antialiasing is disabled. + + + Multisample antialiasing is set to 2×. + + + Multisample antialiasing is set to 4×. + + + Multisample antialiasing is set to 8×. + + + Multisample antialiasing is set to 16×. + + + Multisample antialiasing is set to 2× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). + + + Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). + + + Number of objects drawn in a single frame. + + + Number of vertices drawn in a single frame. + + + Number of material changes during this frame. + + + Number of shader changes during this frame. + + + Number of surface changes during this frame. + + + Number of draw calls during this frame. + + + Represents the size of the [enum ViewportRenderInfo] enum. + + + Debug draw is disabled. Default setting. + + + Debug draw sets objects to unshaded. + + + + + Overwrites clear color to [code](0,0,0,0)[/code]. + + + Debug draw draws objects in wireframe. + + + + + + + + + + + + + + + + + + + + + + + + + Use the clear color as background. + + + Use a specified color as the background. + + + Use a sky resource for the background. + + + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. + + + Do not clear the background, use whatever was rendered last frame as the background. + + + Displays a camera feed in the background. + + + Represents the size of the [enum EnvironmentBG] enum. + + + + + + + + + + + + + + + + + + + + + + + + + + + Output color as they came in. + + + Use the Reinhard tonemapper. + + + Use the filmic tonemapper. + + + Use the ACES tonemapper. + + + Disables the blur set for SSAO. Will make SSAO look noisier. + + + Perform a 1x1 blur on the SSAO output. + + + Performs a 2x2 blur on the SSAO output. + + + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. + + + Lowest quality of screen space ambient occlusion. + + + Medium quality screen space ambient occlusion. + + + Highest quality screen space ambient occlusion. + + + + + + + + + + + + + + + + + + + Do not use a debug mode. + + + Draw all objects as wireframe models. + + + Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. + + + Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. + + + The instance does not have a type. + + + The instance is a mesh. + + + The instance is a multimesh. + + + The instance is an immediate geometry. + + + The instance is a particle emitter. + + + The instance is a light. + + + The instance is a reflection probe. + + + The instance is a GI probe. + + + The instance is a lightmap capture. + + + Represents the size of the [enum InstanceType] enum. + + + A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). + + + Allows the instance to be used in baked lighting. + + + + + When set, manually requests to draw geometry on next frame. + + + Represents the size of the [enum InstanceFlags] enum. + + + Disable shadows from this instance. + + + Cast shadows from this instance. + + + Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. + + + Only render the shadows from the object. The object itself will not be drawn. + + + The nine patch gets stretched where needed. + + + The nine patch gets filled with tiles where needed. + + + The nine patch gets filled with tiles where needed and stretches them a bit if needed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds light color additive to the canvas. + + + Adds light color subtractive to the canvas. + + + The light adds color depending on transparency. + + + The light adds color depending on mask. + + + Do not apply a filter to canvas light shadows. + + + Use PCF5 filtering to filter canvas light shadows. + + + Use PCF13 filtering to filter canvas light shadows. + + + + + Culling of the canvas occluder is disabled. + + + Culling of the canvas occluder is clockwise. + + + Culling of the canvas occluder is counterclockwise. + + + The amount of objects in the frame. + + + The amount of vertices in the frame. + + + The amount of modified materials in the frame. + + + The amount of shader rebinds in the frame. + + + The amount of surface changes in the frame. + + + The amount of draw calls in frame. + + + Unimplemented in the GLES2 rendering backend, always returns 0. + + + The amount of video memory used, i.e. texture and vertex memory combined. + + + The amount of texture memory used. + + + The amount of vertex memory used. + + + Hardware supports shaders. This enum is currently unused in Godot 3.x. + + + Hardware supports multithreading. This enum is currently unused in Godot 3.x. + + + diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml deleted file mode 100644 index e2b7813361..0000000000 --- a/doc/classes/RigidBody.xml +++ /dev/null @@ -1,253 +0,0 @@ - - - - Physics Body whose position is determined through physics simulation in 3D space. - - - This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. - A RigidBody has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. - [b]Note:[/b] Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. - If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator]. - - - https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html - - - - - - - - - Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body. - - - - - - - - - Adds a constant directional force without affecting rotation. - This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. - - - - - - - - - - - Adds a constant force (i.e. acceleration). - - - - - - - - - Adds a constant rotational force (i.e. a motor) without affecting position. - - - - - - - - - Applies a directional impulse without affecting rotation. - This is equivalent to [code]apply_impulse(Vector3(0,0,0), impulse)[/code]. - - - - - - - - - - - Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. - - - - - - - - - Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed. - - - - - - - - - Returns [code]true[/code] if the specified linear or rotational axis is locked. - - - - - - - Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. - [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. - - - - - - - - - - - Locks the specified linear or rotational axis. - - - - - - - - - Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. - - - - - - Damps RigidBody's rotational forces. - - - RigidBody's rotational velocity. - - - Lock the body's rotation in the X axis. - - - Lock the body's rotation in the Y axis. - - - Lock the body's rotation in the Z axis. - - - Lock the body's movement in the X axis. - - - Lock the body's movement in the Y axis. - - - Lock the body's movement in the Z axis. - - - If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. - - - If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody. - - - The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. - - - If [code]true[/code], continuous collision detection is used. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. - - - If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. - - - This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. - - - The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden. - - - The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. - - - The body's mass. - - - The body mode. See [enum Mode] for possible values. - - - The physics material override for the body. - If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. - - - If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. - - - The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b]. - - - - - - - - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - - - - - - - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - - - - - - - - - - - - - Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with. - - - - - - - - - - - - - Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with. - - - - - Emitted when the body changes its sleeping state. Either by sleeping or waking up. - - - - - - Rigid body mode. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. - - - Static mode. The body behaves like a [StaticBody], and can only move by user code. - - - Character body mode. This behaves like a rigid body, but can not rotate. - - - Kinematic body mode. The body behaves like a [KinematicBody], and can only move by user code. - - - diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 79c4205f59..e746d7fc96 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -16,7 +16,7 @@ - + Allows you to read and safely modify the simulation state for the object. Use this instead of [method Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body. @@ -106,10 +106,10 @@ - + - Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [Physics2DTestMotionResult], which contains additional information about the collision (should there be one). + Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [PhysicsTestMotionResult2D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml new file mode 100644 index 0000000000..829589f650 --- /dev/null +++ b/doc/classes/RigidBody3D.xml @@ -0,0 +1,253 @@ + + + + Physics Body whose position is determined through physics simulation in 3D space. + + + This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. + A RigidBody3D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. + [b]Note:[/b] Don't change a RigidBody3D's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. + If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator]. + + + https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html + + + + + + + + + Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body. + + + + + + + + + Adds a constant directional force without affecting rotation. + This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. + + + + + + + + + + + Adds a constant force (i.e. acceleration). + + + + + + + + + Adds a constant rotational force (i.e. a motor) without affecting position. + + + + + + + + + Applies a directional impulse without affecting rotation. + This is equivalent to [code]apply_impulse(Vector3(0,0,0), impulse)[/code]. + + + + + + + + + + + Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. + + + + + + + + + Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed. + + + + + + + + + Returns [code]true[/code] if the specified linear or rotational axis is locked. + + + + + + + Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + + + + + + + + + + + Locks the specified linear or rotational axis. + + + + + + + + + Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + + + + + + Damps RigidBody3D's rotational forces. + + + RigidBody3D's rotational velocity. + + + Lock the body's rotation in the X axis. + + + Lock the body's rotation in the Y axis. + + + Lock the body's rotation in the Z axis. + + + Lock the body's movement in the X axis. + + + Lock the body's movement in the Y axis. + + + Lock the body's movement in the Z axis. + + + If [code]true[/code], the RigidBody3D will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. + + + If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. + + + The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + + + If [code]true[/code], continuous collision detection is used. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. + + + If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + + + This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + + + The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden. + + + The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. + + + The body's mass. + + + The body mode. See [enum Mode] for possible values. + + + The physics material override for the body. + If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + + + If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. + + + The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b]. + + + + + + + + Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + + + + + + + Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + + + + + + + + + + + + + Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. + This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with. + + + + + + + + + + + + + Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. + This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with. + + + + + Emitted when the body changes its sleeping state. Either by sleeping or waking up. + + + + + + Rigid body mode. This is the "natural" state of a rigid body. It is affected by forces, and can move, rotate, and be affected by user code. + + + Static mode. The body behaves like a [StaticBody3D], and can only move by user code. + + + Character body mode. This behaves like a rigid body, but can not rotate. + + + Kinematic body mode. The body behaves like a [KinematicBody3D], and can only move by user code. + + + diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml index 654e42a3c6..be8d8d0078 100644 --- a/doc/classes/RootMotionView.xml +++ b/doc/classes/RootMotionView.xml @@ -1,5 +1,5 @@ - + diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml deleted file mode 100644 index d70d2c09b3..0000000000 --- a/doc/classes/Shape.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - Base class for all 3D shape resources. - - - Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody] or [Area] objects. - - - https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html - - - - - - The collision margin for the shape. - - - - - diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml new file mode 100644 index 0000000000..1af6550dc5 --- /dev/null +++ b/doc/classes/Shape3D.xml @@ -0,0 +1,21 @@ + + + + Base class for all 3D shape resources. + + + Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody3D] or [Area3D] objects. + + + https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html + + + + + + The collision margin for the shape. + + + + + diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml deleted file mode 100644 index eaab4063b8..0000000000 --- a/doc/classes/Skeleton.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - Skeleton for characters and animated objects. - - - Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics. - The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. - Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. - - - - - - - - - - - Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. - - - - - - - - - - - [i]Deprecated soon.[/i] - - - - - - - Clear all the bones in this skeleton. - - - - - - - - - Returns the bone index that matches [code]name[/code] as its name. - - - - - - - Returns the amount of bones in the skeleton. - - - - - - - - - Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose. - - - - - - - - - Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. - - - - - - - - - Returns the name of the bone at index [code]index[/code]. - - - - - - - - - Returns the bone index which is the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. - [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code]. - - - - - - - - - Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose. - - - - - - - - - Returns the rest transform for a bone [code]bone_idx[/code]. - - - - - - - - - [i]Deprecated soon.[/i] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets the bone index [code]parent_idx[/code] as the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. - [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code]. - - - - - - - - - - - Returns the pose transform for bone [code]bone_idx[/code]. - - - - - - - - - - - Sets the rest transform for bone [code]bone_idx[/code]. - - - - - - - - - - - [i]Deprecated soon.[/i] - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml new file mode 100644 index 0000000000..08404fb467 --- /dev/null +++ b/doc/classes/Skeleton3D.xml @@ -0,0 +1,275 @@ + + + + Skeleton for characters and animated objects. + + + Skeleton3D provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics. + The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose. + Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone. + + + + + + + + + + + Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. + + + + + + + + + + + [i]Deprecated soon.[/i] + + + + + + + Clear all the bones in this skeleton. + + + + + + + + + + + + + + + Returns the bone index that matches [code]name[/code] as its name. + + + + + + + Returns the amount of bones in the skeleton. + + + + + + + + + Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose. + + + + + + + + + Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. + + + + + + + + + Returns the name of the bone at index [code]index[/code]. + + + + + + + + + Returns the bone index which is the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. + [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code]. + + + + + + + + + Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose. + + + + + + + + + Returns the rest transform for a bone [code]bone_idx[/code]. + + + + + + + + + [i]Deprecated soon.[/i] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sets the bone index [code]parent_idx[/code] as the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. + [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code]. + + + + + + + + + + + Returns the pose transform for bone [code]bone_idx[/code]. + + + + + + + + + + + Sets the rest transform for bone [code]bone_idx[/code]. + + + + + + + + + + + [i]Deprecated soon.[/i] + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml deleted file mode 100644 index 1db78314d2..0000000000 --- a/doc/classes/SkeletonIK.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml new file mode 100644 index 0000000000..de83847403 --- /dev/null +++ b/doc/classes/SkeletonIK3D.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml deleted file mode 100644 index dc0cf96eb4..0000000000 --- a/doc/classes/SliderJoint.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - Piston kind of slider between two bodies in 3D. - - - Slides across the X axis of the pivot object. - - - - - - - - - - - - - - - - - - - - - - - - - - The amount of damping of the rotation when the limit is surpassed. - A lower damping value allows a rotation initiated by body A to travel to body B slower. - - - The lower limit of rotation in the slider. - - - The amount of restitution of the rotation when the limit is surpassed. - Does not affect damping. - - - A factor applied to the all rotation once the limit is surpassed. - Makes all rotation slower when between 0 and 1. - - - The upper limit of rotation in the slider. - - - The amount of damping of the rotation in the limits. - - - The amount of restitution of the rotation in the limits. - - - A factor applied to the all rotation in the limits. - - - The amount of damping of the rotation across axes orthogonal to the slider. - - - The amount of restitution of the rotation across axes orthogonal to the slider. - - - A factor applied to the all rotation across axes orthogonal to the slider. - - - The amount of damping that happens once the limit defined by [member linear_limit/lower_distance] and [member linear_limit/upper_distance] is surpassed. - - - The minimum difference between the pivot points on their X axis before damping happens. - - - The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. - - - A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. - - - The maximum difference between the pivot points on their X axis before damping happens. - - - The amount of damping inside the slider limits. - - - The amount of restitution inside the slider limits. - - - A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. - - - The amount of damping when movement is across axes orthogonal to the slider. - - - The amount of restitution when movement is across axes orthogonal to the slider. - - - A factor applied to the movement across axes orthogonal to the slider. - - - - - The maximum difference between the pivot points on their X axis before damping happens. - - - The minimum difference between the pivot points on their X axis before damping happens. - - - A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. - - - The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. - - - The amount of damping once the slider limits are surpassed. - - - A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. - - - The amount of restitution inside the slider limits. - - - The amount of damping inside the slider limits. - - - A factor applied to the movement across axes orthogonal to the slider. - - - The amount of restitution when movement is across axes orthogonal to the slider. - - - The amount of damping when movement is across axes orthogonal to the slider. - - - The upper limit of rotation in the slider. - - - The lower limit of rotation in the slider. - - - A factor applied to the all rotation once the limit is surpassed. - - - The amount of restitution of the rotation when the limit is surpassed. - - - The amount of damping of the rotation when the limit is surpassed. - - - A factor applied to the all rotation in the limits. - - - The amount of restitution of the rotation in the limits. - - - The amount of damping of the rotation in the limits. - - - A factor applied to the all rotation across axes orthogonal to the slider. - - - The amount of restitution of the rotation across axes orthogonal to the slider. - - - The amount of damping of the rotation across axes orthogonal to the slider. - - - Represents the size of the [enum Param] enum. - - - diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml new file mode 100644 index 0000000000..efd6353e3c --- /dev/null +++ b/doc/classes/SliderJoint3D.xml @@ -0,0 +1,173 @@ + + + + Piston kind of slider between two bodies in 3D. + + + Slides across the X axis of the pivot object. + + + + + + + + + + + + + + + + + + + + + + + + + + The amount of damping of the rotation when the limit is surpassed. + A lower damping value allows a rotation initiated by body A to travel to body B slower. + + + The lower limit of rotation in the slider. + + + The amount of restitution of the rotation when the limit is surpassed. + Does not affect damping. + + + A factor applied to the all rotation once the limit is surpassed. + Makes all rotation slower when between 0 and 1. + + + The upper limit of rotation in the slider. + + + The amount of damping of the rotation in the limits. + + + The amount of restitution of the rotation in the limits. + + + A factor applied to the all rotation in the limits. + + + The amount of damping of the rotation across axes orthogonal to the slider. + + + The amount of restitution of the rotation across axes orthogonal to the slider. + + + A factor applied to the all rotation across axes orthogonal to the slider. + + + The amount of damping that happens once the limit defined by [member linear_limit/lower_distance] and [member linear_limit/upper_distance] is surpassed. + + + The minimum difference between the pivot points on their X axis before damping happens. + + + The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. + + + A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + + + The maximum difference between the pivot points on their X axis before damping happens. + + + The amount of damping inside the slider limits. + + + The amount of restitution inside the slider limits. + + + A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + + + The amount of damping when movement is across axes orthogonal to the slider. + + + The amount of restitution when movement is across axes orthogonal to the slider. + + + A factor applied to the movement across axes orthogonal to the slider. + + + + + The maximum difference between the pivot points on their X axis before damping happens. + + + The minimum difference between the pivot points on their X axis before damping happens. + + + A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + + + The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. + + + The amount of damping once the slider limits are surpassed. + + + A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + + + The amount of restitution inside the slider limits. + + + The amount of damping inside the slider limits. + + + A factor applied to the movement across axes orthogonal to the slider. + + + The amount of restitution when movement is across axes orthogonal to the slider. + + + The amount of damping when movement is across axes orthogonal to the slider. + + + The upper limit of rotation in the slider. + + + The lower limit of rotation in the slider. + + + A factor applied to the all rotation once the limit is surpassed. + + + The amount of restitution of the rotation when the limit is surpassed. + + + The amount of damping of the rotation when the limit is surpassed. + + + A factor applied to the all rotation in the limits. + + + The amount of restitution of the rotation in the limits. + + + The amount of damping of the rotation in the limits. + + + A factor applied to the all rotation across axes orthogonal to the slider. + + + The amount of restitution of the rotation across axes orthogonal to the slider. + + + The amount of damping of the rotation across axes orthogonal to the slider. + + + Represents the size of the [enum Param] enum. + + + diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml deleted file mode 100644 index 46a00fbd67..0000000000 --- a/doc/classes/SoftBody.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - A soft mesh physics body. - - - A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. - - - https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html - - - - - - - - - Adds a body to the list of bodies that this body can't collide with. - - - - - - - Returns an array of nodes that were added as collision exceptions for this body. - - - - - - - - - Returns an individual bit on the collision mask. - - - - - - - - - Returns an individual bit on the collision mask. - - - - - - - - - Removes a body from the list of bodies that this body can't collide with. - - - - - - - - - - - Sets individual bits on the layer mask. Use this if you only need to change one layer's value. - - - - - - - - - - - Sets individual bits on the collision mask. Use this if you only need to change one layer's value. - - - - - - - - The physics layers this SoftBody is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - - - The physics layers this SoftBody scans for collisions. - - - - - - - - - [NodePath] to a [CollisionObject] this SoftBody should avoid clipping. - - - - - - - If [code]true[/code], the [SoftBody] will respond to [RayCast]s. - - - Increasing this value will improve the resulting simulation, but can affect performance. Use with care. - - - The SoftBody's mass. - - - - - - - diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml new file mode 100644 index 0000000000..24d6609900 --- /dev/null +++ b/doc/classes/SoftBody3D.xml @@ -0,0 +1,117 @@ + + + + A soft mesh physics body. + + + A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. + + + https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html + + + + + + + + + Adds a body to the list of bodies that this body can't collide with. + + + + + + + Returns an array of nodes that were added as collision exceptions for this body. + + + + + + + + + Returns an individual bit on the collision mask. + + + + + + + + + Returns an individual bit on the collision mask. + + + + + + + + + Removes a body from the list of bodies that this body can't collide with. + + + + + + + + + + + Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + + + + + + + + + + + Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + + + + + + + + The physics layers this SoftBody3D is in. + Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + + + The physics layers this SoftBody3D scans for collisions. + + + + + + + + + [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping. + + + + + + + If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s. + + + Increasing this value will improve the resulting simulation, but can affect performance. Use with care. + + + The SoftBody3D's mass. + + + + + + + diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml deleted file mode 100644 index d057db8519..0000000000 --- a/doc/classes/Spatial.xml +++ /dev/null @@ -1,350 +0,0 @@ - - - - Most basic 3D game object, parent of all 3D-related nodes. - - - Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use [Spatial] as a parent node to move, scale, rotate and show/hide children in a 3D project. - Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Spatial] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Spatial]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Spatial] object itself is referred to as object-local coordinate system. - - - https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html - - - - - - - Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. - - - - - - - Returns the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial]. - - - - - - - Returns the current [World] resource this [Spatial] node is registered to. - - - - - - - - - - - Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system. - - - - - - - - - Scales the global (world) transformation by the given [Vector3] scale factors. - - - - - - - - - Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system. - - - - - - - Disables rendering of this node. Changes [member visible] to [code]false[/code]. - - - - - - - Returns whether node notifies about its local transformation changes. [Spatial] will not propagate this by default. - - - - - - - Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. - - - - - - - Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations. - - - - - - - Returns whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default. - - - - - - - Returns whether the node is visible, taking into consideration that its parents visibility. - - - - - - - - - - - Rotates itself so that the local -Z axis points towards the [code]target[/code] position. - The transform will first be rotated around the given [code]up[/code] vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the [code]target[/code] and [code]up[/code] vectors. - Operations take place in global space. - - - - - - - - - - - - - Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. - - - - - - - Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform]. - - - - - - - - - - - Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. - - - - - - - - - - - Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system. - - - - - - - - - Rotates the local transformation around the X axis by angle in radians. - - - - - - - - - Rotates the local transformation around the Y axis by angle in radians. - - - - - - - - - Rotates the local transformation around the Z axis by angle in radians. - - - - - - - - - Scales the local transformation by given 3D scale factors in object-local coordinate system. - - - - - - - - - Makes the node ignore its parents transformations. Node transformations are only in global space. - - - - - - - - - Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved. - - - - - - - Reset all transformations for this node (sets its [Transform] to the identity matrix). - - - - - - - - - Sets whether the node ignores notification that its transformation (global or local) changed. - - - - - - - - - Sets whether the node notifies about its local transformation changes. [Spatial] will not propagate this by default. - - - - - - - - - Sets whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default. - - - - - - - Enables rendering of this node. Changes [member visible] to [code]true[/code]. - - - - - - - - - Transforms [code]local_point[/code] from this node's local space to world space. - - - - - - - - - Transforms [code]global_point[/code] from world space to this node's local space. - - - - - - - - - Changes the node's position by the given offset [Vector3]. - Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. - - - - - - - - - Changes the node's position by the given offset [Vector3] in local space. - - - - - - - Updates the [SpatialGizmo] of this node. - - - - - - The [SpatialGizmo] for this node. Used for example in [EditorSpatialGizmo] as custom visualization and editing handles in Editor. - - - World space (global) [Transform] of this node. - - - Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). - [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. - - - Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). - - - Scale part of the local transformation. - - - Local space [Transform] of this node, with respect to the parent node. - - - Local translation of this node. - - - If [code]true[/code], this node is drawn. - - - - - - Emitted when node visibility changes. - - - - - - Spatial nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. - In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. - - - Spatial nodes receives this notification when they are registered to new [World] resource. - - - Spatial nodes receives this notification when they are unregistered from current [World] resource. - - - Spatial nodes receives this notification when their visibility changes. - - - diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/SpatialGizmo.xml deleted file mode 100644 index 5260eaa8a3..0000000000 --- a/doc/classes/SpatialGizmo.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml deleted file mode 100644 index 7a4e0c054a..0000000000 --- a/doc/classes/SpatialVelocityTracker.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml deleted file mode 100644 index 75dab58c38..0000000000 --- a/doc/classes/SphereShape.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Sphere shape for 3D collisions. - - - Sphere shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. This shape is useful for modeling sphere-like 3D objects. - - - - - - - - The sphere's radius. The shape's diameter is double the radius. - - - - - diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml new file mode 100644 index 0000000000..1eaf890639 --- /dev/null +++ b/doc/classes/SphereShape3D.xml @@ -0,0 +1,20 @@ + + + + Sphere shape for 3D collisions. + + + Sphere shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. This shape is useful for modeling sphere-like 3D objects. + + + + + + + + The sphere's radius. The shape's diameter is double the radius. + + + + + diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml deleted file mode 100644 index 351d4f8aff..0000000000 --- a/doc/classes/SpotLight.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - A spotlight, such as a reflector spotlight or a lantern. - - - A Spotlight is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. - - - https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html - - - - - - The spotlight's angle in degrees. - - - The spotlight's angular attenuation curve. - - - The spotlight's light energy attenuation curve. - - - The maximal range that can be reached by the spotlight. - - - - - diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml new file mode 100644 index 0000000000..f094818c21 --- /dev/null +++ b/doc/classes/SpotLight3D.xml @@ -0,0 +1,30 @@ + + + + A spotlight, such as a reflector spotlight or a lantern. + + + A Spotlight is a type of [Light3D] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light3D]. + + + https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html + + + + + + The spotlight's angle in degrees. + + + The spotlight's angular attenuation curve. + + + The spotlight's light energy attenuation curve. + + + The maximal range that can be reached by the spotlight. + + + + + diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml deleted file mode 100644 index 780ed5077d..0000000000 --- a/doc/classes/SpringArm.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - A helper node, mostly used in 3rd person cameras. - - - The SpringArm node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin. - The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment. - The SpringArm will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis. - If you use the SpringArm as a camera controller for your player, you might need to exclude the player's collider from the SpringArm's collision check. - - - - - - - - - - - Adds the [PhysicsBody] object with the given [RID] to the list of [PhysicsBody] objects excluded from the collision check. - - - - - - - Clears the list of [PhysicsBody] objects excluded from the collision check. - - - - - - - Returns the proportion between the current arm length (after checking for collisions) and the [member spring_length]. Ranges from 0 to 1. - - - - - - - - - Removes the given [RID] from the list of [PhysicsBody] objects excluded from the collision check. - - - - - - The layers against which the collision check shall be done. - - - When the collision check is made, a candidate length for the SpringArm is given. - The margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm. - This margin is useful for when the SpringArm has a [Camera] as a child node: without the margin, the [Camera] would be placed on the exact point of collision, while with the margin the [Camera] would be placed close to the point of collision. - - - The [Shape] to use for the SpringArm. - When the shape is set, the SpringArm will cast the [Shape] on its z axis instead of performing a ray cast. - - - The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes. - To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState] documentation. - - - - - diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml new file mode 100644 index 0000000000..8305494c2b --- /dev/null +++ b/doc/classes/SpringArm3D.xml @@ -0,0 +1,68 @@ + + + + A helper node, mostly used in 3rd person cameras. + + + The SpringArm3D node is a node that casts a ray (or collision shape) along its z axis and moves all its direct children to the collision point, minus a margin. + The most common use case for this is to make a 3rd person camera that reacts to collisions in the environment. + The SpringArm3D will either cast a ray, or if a shape is given, it will cast the shape in the direction of its z axis. + If you use the SpringArm3D as a camera controller for your player, you might need to exclude the player's collider from the SpringArm3D's collision check. + + + + + + + + + + + Adds the [PhysicsBody3D] object with the given [RID] to the list of [PhysicsBody3D] objects excluded from the collision check. + + + + + + + Clears the list of [PhysicsBody3D] objects excluded from the collision check. + + + + + + + Returns the proportion between the current arm length (after checking for collisions) and the [member spring_length]. Ranges from 0 to 1. + + + + + + + + + Removes the given [RID] from the list of [PhysicsBody3D] objects excluded from the collision check. + + + + + + The layers against which the collision check shall be done. + + + When the collision check is made, a candidate length for the SpringArm3D is given. + The margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm3D. + This margin is useful for when the SpringArm3D has a [Camera3D] as a child node: without the margin, the [Camera3D] would be placed on the exact point of collision, while with the margin the [Camera3D] would be placed close to the point of collision. + + + The [Shape3D] to use for the SpringArm3D. + When the shape is set, the SpringArm3D will cast the [Shape3D] on its z axis instead of performing a ray cast. + + + The maximum extent of the SpringArm3D. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm3D's child nodes. + To know more about how to perform a shape cast or a ray cast, please consult the [PhysicsDirectSpaceState3D] documentation. + + + + + diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml deleted file mode 100644 index 6c21881535..0000000000 --- a/doc/classes/Sprite.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - General-purpose sprite node. - - - A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. - - - - - - - - - Returns a [Rect2] representing the Sprite's boundary in local coordinates. Can be used to detect if the Sprite was clicked. Example: - [codeblock] - func _input(event): - if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT: - if get_rect().has_point(to_local(event.position)): - print("A click!") - [/codeblock] - - - - - - - - - Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case. - [b]Note:[/b] It also returns [code]false[/code], if the sprite's texture is [code]null[/code] or if the given position is invalid. - - - - - - If [code]true[/code], texture is centered. - - - If [code]true[/code], texture is flipped horizontally. - - - If [code]true[/code], texture is flipped vertically. - - - Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. - - - Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] must be greater than 1. - - - The number of columns in the sprite sheet. - - - The normal map gives depth to the Sprite. - - - The texture's drawing offset. - - - If [code]true[/code], texture is cut from a larger atlas texture. See [member region_rect]. - - - If [code]true[/code], the outermost pixels get blurred out. - - - The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. - - - Strength of the specular light effect of this [Sprite]. - - - The color of the specular light effect. - - - The specular map is used for more control on the shininess effect. - - - [Texture2D] object to draw. - - - The number of rows in the sprite sheet. - - - - - - Emitted when the [member frame] changes. - - - - - Emitted when the [member texture] changes. - - - - - - diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml new file mode 100644 index 0000000000..950fda4e20 --- /dev/null +++ b/doc/classes/Sprite2D.xml @@ -0,0 +1,100 @@ + + + + General-purpose sprite node. + + + A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. + + + + + + + + + Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example: + [codeblock] + func _input(event): + if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT: + if get_rect().has_point(to_local(event.position)): + print("A click!") + [/codeblock] + + + + + + + + + Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case. + [b]Note:[/b] It also returns [code]false[/code], if the sprite's texture is [code]null[/code] or if the given position is invalid. + + + + + + If [code]true[/code], texture is centered. + + + If [code]true[/code], texture is flipped horizontally. + + + If [code]true[/code], texture is flipped vertically. + + + Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. + + + Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] must be greater than 1. + + + The number of columns in the sprite sheet. + + + The normal map gives depth to the Sprite2D. + + + The texture's drawing offset. + + + If [code]true[/code], texture is cut from a larger atlas texture. See [member region_rect]. + + + If [code]true[/code], the outermost pixels get blurred out. + + + The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. + + + Strength of the specular light effect of this [Sprite2D]. + + + The color of the specular light effect. + + + The specular map is used for more control on the shininess effect. + + + [Texture2D] object to draw. + + + The number of rows in the sprite sheet. + + + + + + Emitted when the [member frame] changes. + + + + + Emitted when the [member texture] changes. + + + + + + diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 63958eeb7b..f59d5130c9 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -5,7 +5,7 @@ A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. - [b]Note:[/b] There are [url=https://github.com/godotengine/godot/issues/20855]known performance issues[/url] when using [Sprite3D]. Consider using a [MeshInstance] with a [QuadMesh] as the mesh instead. You can still have billboarding by enabling billboard properties in the QuadMesh's [StandardMaterial3D]. + [b]Note:[/b] There are [url=https://github.com/godotengine/godot/issues/20855]known performance issues[/url] when using [Sprite3D]. Consider using a [MeshInstance3D] with a [QuadMesh] as the mesh instead. You can still have billboarding by enabling billboard properties in the QuadMesh's [StandardMaterial3D]. diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 563a17e8f6..479dc5f94c 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -1,5 +1,5 @@ - + 2D sprite node in 3D environment. @@ -76,7 +76,7 @@ The size of one pixel's width on the sprite to scale it in 3D. - If [code]true[/code], the [Light] in the [Environment] has effects on the sprite. + If [code]true[/code], the [Light3D] in the [Environment] has effects on the sprite. If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the sprite invisible. diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 9facdde681..6e1e1688f4 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -1,10 +1,10 @@ - Sprite frame library for AnimatedSprite. + Sprite frame library for AnimatedSprite2D. - Sprite frame library for [AnimatedSprite]. Contains frames and animation data for playback. + Sprite frame library for [AnimatedSprite2D]. Contains frames and animation data for playback. diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml deleted file mode 100644 index 280b95d182..0000000000 --- a/doc/classes/StaticBody.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - Static body for 3D physics. - - - Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody], they don't consume any CPU resources as long as they don't move. - Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - - - - - - - - The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. - - - The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. - - - The physics material override for the body. - If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. - - - - - diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml new file mode 100644 index 0000000000..c896efc314 --- /dev/null +++ b/doc/classes/StaticBody3D.xml @@ -0,0 +1,28 @@ + + + + Static body for 3D physics. + + + Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move. + Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + + + + + + + + The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. + + + The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. + + + The physics material override for the body. + If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + + + + + diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index 63cdb0d90a..ffe806cef7 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -4,7 +4,7 @@ Texture for 2D and 3D. - A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. + A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite2D] or GUI [Control]. Textures are often created by loading them from a file. See [method @GDScript.load]. [Texture2D] is a base for other resources. It cannot be used directly. @@ -28,12 +28,12 @@ - + - + - Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. + Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [code]position[/code]. @@ -55,12 +55,12 @@ - + - + - Draws the texture using a [CanvasItem] with the [VisualServer] API. + Draws the texture using a [CanvasItem] with the [RenderingServer] API. @@ -82,14 +82,14 @@ - + - + - Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. + Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API. diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml deleted file mode 100644 index 74879419a1..0000000000 --- a/doc/classes/VehicleBody.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - Physics body that simulates the behavior of a car. - - - This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape] for the main body of your vehicle and add [VehicleWheel] nodes for the wheels. You should also add a [MeshInstance] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly. - [b]Note:[/b] The origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape] and [MeshInstance] upwards. - - - - - - - - Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. - - - Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. - [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. - A negative value will result in the vehicle reversing. - - - - The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel.use_as_steering] set to [code]true[/code] will automatically be rotated. - - - - - - diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml new file mode 100644 index 0000000000..b8b85ff605 --- /dev/null +++ b/doc/classes/VehicleBody3D.xml @@ -0,0 +1,31 @@ + + + + Physics body that simulates the behavior of a car. + + + This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape3D] for the main body of your vehicle and add [VehicleWheel3D] nodes for the wheels. You should also add a [MeshInstance3D] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly. + [b]Note:[/b] The origin point of your VehicleBody3D will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape3D] and [MeshInstance3D] upwards. + + + + + + + + Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. + + + Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. + A negative value will result in the vehicle reversing. + + + + The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated. + + + + + + diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml deleted file mode 100644 index 1a6a226fd1..0000000000 --- a/doc/classes/VehicleWheel.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - Physics object that simulates the behavior of a wheel. - - - This node needs to be used as a child node of [VehicleBody] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. - - - - - - - - - Returns the rotational speed of the wheel in revolutions per minute. - - - - - - - Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road). - - - - - - - Returns [code]true[/code] if this wheel is in contact with a surface. - - - - - - Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. - - - The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. - - - The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5. - - - Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. - [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. - A negative value will result in the wheel reversing. - - - The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. - - - The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. - - - This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. - - - This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. - - - If [code]true[/code], this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody.steering] and ignored if you are using the per-wheel [member steering] value instead. - - - If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody.engine_force] and ignored if you are using the per-wheel [member engine_force] value instead. - - - This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear. - It's best to set this to 1.0 when starting out. - - - The radius of the wheel in meters. - - - This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. - - - This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. - - - - - diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml new file mode 100644 index 0000000000..c71d797eff --- /dev/null +++ b/doc/classes/VehicleWheel3D.xml @@ -0,0 +1,83 @@ + + + + Physics object that simulates the behavior of a wheel. + + + This node needs to be used as a child node of [VehicleBody3D] and simulates the behavior of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface. + + + + + + + + + Returns the rotational speed of the wheel in revolutions per minute. + + + + + + + Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road). + + + + + + + Returns [code]true[/code] if this wheel is in contact with a surface. + + + + + + Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. + + + The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. + + + The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5. + + + Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. + A negative value will result in the wheel reversing. + + + The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. + + + The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. + + + This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. + + + This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. + + + If [code]true[/code], this wheel will be turned when the car steers. This value is used in conjunction with [member VehicleBody3D.steering] and ignored if you are using the per-wheel [member steering] value instead. + + + If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [member VehicleBody3D.engine_force] and ignored if you are using the per-wheel [member engine_force] value instead. + + + This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear. + It's best to set this to 1.0 when starting out. + + + The radius of the wheel in meters. + + + This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. + + + This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. + + + + + diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml new file mode 100644 index 0000000000..98f7533c76 --- /dev/null +++ b/doc/classes/VelocityTracker3D.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 0632be28e1..dd0b17d084 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -4,7 +4,7 @@ Creates a sub-view into the screen. - A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too. + A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too. Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports. If a viewport is a child of a [ViewportContainer], it will automatically take up its size, otherwise it must be set manually. Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it. @@ -17,7 +17,7 @@ - + Returns the 3D world of the viewport, or if none the world of the parent viewport. @@ -31,7 +31,7 @@ - + Returns the active 3D camera. @@ -99,7 +99,7 @@ - Returns the viewport's RID from the [VisualServer]. + Returns the viewport's RID from the [RenderingServer]. @@ -251,13 +251,13 @@ The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems. - If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. + If [code]true[/code], the viewport will use [World3D] defined in [code]world[/code] property. If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. - If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen]. + If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method RenderingServer.viewport_set_render_direct_to_screen]. The clear mode when viewport used as a render target. @@ -290,8 +290,8 @@ If [code]true[/code], the viewport should render its background as transparent. - - The custom [World] which can be used as 3D environment source. + + The custom [World3D] which can be used as 3D environment source. The custom [World2D] which can be used as 2D environment source. diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml deleted file mode 100644 index 7ab6c52e6c..0000000000 --- a/doc/classes/VisibilityEnabler.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - Enables certain nodes only when visible. - - - The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. - Note that VisibilityEnabler will not affect nodes added after scene initialization. - - - - - - - - - - - Returns whether the enabler identified by given [enum Enabler] constant is active. - - - - - - - - - - - Sets active state of the enabler identified by given [enum Enabler] constant. - - - - - - If [code]true[/code], [RigidBody] nodes will be paused. - - - If [code]true[/code], [AnimationPlayer] nodes will be paused. - - - - - This enabler will pause [AnimationPlayer] nodes. - - - This enabler will freeze [RigidBody] nodes. - - - Represents the size of the [enum Enabler] enum. - - - diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index 3f9bf6887a..0bdecafbfa 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -36,13 +36,13 @@ If [code]true[/code], [RigidBody2D] nodes will be paused. - If [code]true[/code], [AnimatedSprite] nodes will be paused. + If [code]true[/code], [AnimatedSprite2D] nodes will be paused. If [code]true[/code], [AnimationPlayer] nodes will be paused. - If [code]true[/code], [Particles2D] nodes will be paused. + If [code]true[/code], [GPUParticles2D] nodes will be paused. If [code]true[/code], the parent's [method Node._physics_process] will be stopped. @@ -59,7 +59,7 @@ This enabler will freeze [RigidBody2D] nodes. - This enabler will stop [Particles2D] nodes. + This enabler will stop [GPUParticles2D] nodes. This enabler will stop the parent's _process function. @@ -68,7 +68,7 @@ This enabler will stop the parent's _physics_process function. - This enabler will stop [AnimatedSprite] nodes animations. + This enabler will stop [AnimatedSprite2D] nodes animations. Represents the size of the [enum Enabler] enum. diff --git a/doc/classes/VisibilityEnabler3D.xml b/doc/classes/VisibilityEnabler3D.xml new file mode 100644 index 0000000000..9c25c6c7c8 --- /dev/null +++ b/doc/classes/VisibilityEnabler3D.xml @@ -0,0 +1,53 @@ + + + + Enables certain nodes only when visible. + + + The VisibilityEnabler3D will disable [RigidBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler3D itself. + Note that VisibilityEnabler3D will not affect nodes added after scene initialization. + + + + + + + + + + + Returns whether the enabler identified by given [enum Enabler] constant is active. + + + + + + + + + + + Sets active state of the enabler identified by given [enum Enabler] constant. + + + + + + If [code]true[/code], [RigidBody3D] nodes will be paused. + + + If [code]true[/code], [AnimationPlayer] nodes will be paused. + + + + + This enabler will pause [AnimationPlayer] nodes. + + + This enabler will freeze [RigidBody3D] nodes. + + + Represents the size of the [enum Enabler] enum. + + + diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml deleted file mode 100644 index 6161017884..0000000000 --- a/doc/classes/VisibilityNotifier.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - Detects when the node is visible on screen. - - - The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera]'s view. - - - - - - - - - If [code]true[/code], the bounding box is on the screen. - [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. - - - - - - The VisibilityNotifier's bounding box. - - - - - - - - Emitted when the VisibilityNotifier enters a [Camera]'s view. - - - - - - - Emitted when the VisibilityNotifier exits a [Camera]'s view. - - - - - Emitted when the VisibilityNotifier enters the screen. - - - - - Emitted when the VisibilityNotifier exits the screen. - - - - - - diff --git a/doc/classes/VisibilityNotifier3D.xml b/doc/classes/VisibilityNotifier3D.xml new file mode 100644 index 0000000000..d8a605c69c --- /dev/null +++ b/doc/classes/VisibilityNotifier3D.xml @@ -0,0 +1,54 @@ + + + + Detects when the node is visible on screen. + + + The VisibilityNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view. + + + + + + + + + If [code]true[/code], the bounding box is on the screen. + [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. + + + + + + The VisibilityNotifier3D's bounding box. + + + + + + + + Emitted when the VisibilityNotifier3D enters a [Camera3D]'s view. + + + + + + + Emitted when the VisibilityNotifier3D exits a [Camera3D]'s view. + + + + + Emitted when the VisibilityNotifier3D enters the screen. + + + + + Emitted when the VisibilityNotifier3D exits the screen. + + + + + + diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml deleted file mode 100644 index 1bbd5cb64d..0000000000 --- a/doc/classes/VisualInstance.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - Parent of all visual 3D nodes. - - - The [VisualInstance] is used to connect a resource to a visual representation. All visual 3D nodes inherit from the [VisualInstance]. In general, you should not access the [VisualInstance] properties directly as they are accessed and managed by the nodes that inherit from [VisualInstance]. [VisualInstance] is the node representation of the [VisualServer] instance. - - - - - - - - - Returns the [AABB] (also known as the bounding box) for this [VisualInstance]. - - - - - - - Returns the RID of the resource associated with this [VisualInstance]. For example, if the Node is a [MeshInstance], this will return the RID of the associated [Mesh]. - - - - - - - Returns the RID of this instance. This RID is the same as the RID returned by [method VisualServer.instance_create]. This RID is needed if you want to call [VisualServer] functions directly on this [VisualInstance]. - - - - - - - - - Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. - - - - - - - Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance]. - Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Spatial]'s [Transform]. - - - - - - - - - Sets the resource that is instantiated by this [VisualInstance], which changes how the engine handles the [VisualInstance] under the hood. Equivalent to [method VisualServer.instance_set_base]. - - - - - - - - - - - Enables a particular layer in [member layers]. - - - - - - The render layer(s) this [VisualInstance] is drawn on. - This object will only be visible for [Camera]s whose cull mask includes the render object this [VisualInstance] is set to. - - - - - diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml new file mode 100644 index 0000000000..6451b3f330 --- /dev/null +++ b/doc/classes/VisualInstance3D.xml @@ -0,0 +1,79 @@ + + + + Parent of all visual 3D nodes. + + + The [VisualInstance3D] is used to connect a resource to a visual representation. All visual 3D nodes inherit from the [VisualInstance3D]. In general, you should not access the [VisualInstance3D] properties directly as they are accessed and managed by the nodes that inherit from [VisualInstance3D]. [VisualInstance3D] is the node representation of the [RenderingServer] instance. + + + + + + + + + Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. + + + + + + + Returns the RID of the resource associated with this [VisualInstance3D]. For example, if the Node is a [MeshInstance3D], this will return the RID of the associated [Mesh]. + + + + + + + Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D]. + + + + + + + + + Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. + + + + + + + Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D]. + Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform]. + + + + + + + + + Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base]. + + + + + + + + + + + Enables a particular layer in [member layers]. + + + + + + The render layer(s) this [VisualInstance3D] is drawn on. + This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. + + + + + diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml deleted file mode 100644 index 00e0b7cdc9..0000000000 --- a/doc/classes/VisualServer.xml +++ /dev/null @@ -1,3737 +0,0 @@ - - - - Server for anything visible. - - - Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. - The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. - The visual server can be used to bypass the scene system entirely. - Resources are created using the [code]*_create[/code] functions. - All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. - In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create]. - Similarly in 2D, a canvas is needed to draw all canvas items. - In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. - In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. - - - https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html - - - - - - - - - - - - - - - Sets images to be rendered in the window margin. - - - - - - - - - - - - - - - Sets margin size, where black bars (or images, if [method black_bars_set_images] was used) are rendered. - - - - - - - Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera.cull_mask]. - - - - - - - - - - - Sets the environment used by this camera. Equivalent to [member Camera.environment]. - - - - - - - - - - - - - - - - - Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. - - - - - - - - - - - - - - - Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. - - - - - - - - - - - - - - - Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. - - - - - - - - - - - Sets [Transform] of camera. - - - - - - - - - - - If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]. - - - - - - - Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - Clears the [CanvasItem] and removes all commands in it. - - - - - - - - - - - - - Sets the [CanvasItem] to copy a rect to the backbuffer. - - - - - - - - - - - Sets the index for the [CanvasItem]. - - - - - - - - - - - Sets a new material to the [CanvasItem]. - - - - - - - - - - - Sets if the [CanvasItem] uses its parent's material. - - - - - - - - - - - If this is enabled, the Z index of the parent will be added to the children's Z index. - - - - - - - - - - - Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first). - - - - - - - - - - - Attaches the canvas light to the canvas. Removes it from its previous canvas. - - - - - - - Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Attaches a light occluder to the canvas. Removes it from its previous canvas. - - - - - - - Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Enables or disables light occluder. - - - - - - - - - - - The light mask. See [LightOccluder2D] for more information on light masks. - - - - - - - - - - - Sets a light occluder's polygon. - - - - - - - - - - - Sets a light occluder's [Transform2D]. - - - - - - - - - - - Sets the color for a light. - - - - - - - - - - - Enables or disables a canvas light. - - - - - - - - - - - Sets a canvas light's energy. - - - - - - - - - - - Sets a canvas light's height. - - - - - - - - - - - The light mask. See [LightOccluder2D] for more information on light masks. - - - - - - - - - - - The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks. - - - - - - - - - - - - - The layer range that gets rendered with this light. - - - - - - - - - - - The mode of the light, see [enum CanvasLightMode] constants. - - - - - - - - - - - Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]. - - - - - - - - - - - Sets the width of the shadow buffer, size gets scaled to the next power of two for this. - - - - - - - - - - - Sets the color of the canvas light's shadow. - - - - - - - - - - - Enables or disables the canvas light's shadow. - - - - - - - - - - - Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. - - - - - - - - - - - Smoothens the shadow. The lower, the smoother. - - - - - - - - - - - Sets texture to be used by light. Equivalent to [member Light2D.texture]. - - - - - - - - - - - Sets the offset of the light's texture. Equivalent to [member Light2D.offset]. - - - - - - - - - - - Sets the canvas light's [Transform2D]. - - - - - - - - - - - - - Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. - - - - - - - Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. - - - - - - - - - - - - - Sets the shape of the occluder polygon. - - - - - - - - - - - Sets the shape of the occluder polygon as lines. - - - - - - - - - - - - - A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2]. - - - - - - - - - - - Modulates all colors in the given canvas. - - - - - - - Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. - - - - - - - Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - - - - - - - - - Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. - - - - - - - - - - - Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). - - - - - - - - - - - Sets the intensity of the background color. - - - - - - - - - - - Sets the maximum layer to use if using Canvas background mode. - - - - - - - - - - - - - - - - - Sets the variables to be used with the scene fog. See [Environment] for more details. - - - - - - - - - - - - - - - - - - - - - Sets the variables to be used with the fog depth effect. See [Environment] for more details. - - - - - - - - - - - - - - - - - Sets the variables to be used with the fog height effect. See [Environment] for more details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.sky]. - - - - - - - - - - - Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov]. - - - - - - - - - - - Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis]. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. - - - - - - - - - - - - - - - - - - - - - - - - - Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. - - - - - - - Removes buffers and clears testcubes. - - - - - - - - - - - Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution. - - - - - - - Synchronizes threads. - - - - - - - - - Tries to free an object in the VisualServer. - - - - - - - - - Returns a certain information, see [enum RenderInfo] for options. - - - - - - - Returns the id of the test cube. Creates one if none exists. - - - - - - - Returns the id of the test texture. Creates one if none exists. - - - - - - - Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). - [b]Note:[/b] When running a headless or server binary, this function returns an empty string. - - - - - - - Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). - [b]Note:[/b] When running a headless or server binary, this function returns an empty string. - - - - - - - Returns the id of a white texture. Creates one if none exists. - - - - - - - Returns [code]true[/code] if changes have been made to the VisualServer's data. [method force_draw] is usually called if this happens. - - - - - - - - - Not yet implemented. Always returns [code]false[/code]. - - - - - - - - - Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code]. - - - - - - - - - - - - - Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]. - - - - - - - - - Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]. - - - - - - - - - - - Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]. - - - - - - - Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]. - - - - - - - - - Returns the material assigned to the [ImmediateGeometry]. - - - - - - - - - - - Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]. - - - - - - - - - - - Sets the material to be used to draw the [ImmediateGeometry]. - - - - - - - - - - - Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]. - - - - - - - - - - - Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]. - - - - - - - - - - - Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]. - - - - - - - - - - - Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex]. - - - - - - - - - - - Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]. - - - - - - - Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. - - - - - - - - - - - Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. - - - - - - - - - - - Attaches a skeleton to an instance. Removes the previous skeleton from the instance. - - - - - - - Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. - - - - - - - - - - - Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Not implemented in Godot 3.x. - - - - - - - - - - - Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]. - - - - - - - - - - - - - - - - - Not implemented in Godot 3.x. - - - - - - - - - - - - - Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. - - - - - - - - - - - Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]. - - - - - - - - - - - Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. - - - - - - - - - - - - - Sets the weight for a given blend shape associated with this instance. - - - - - - - - - - - Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]. - - - - - - - - - - - Function not implemented in Godot 3.x. - - - - - - - - - - - Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]. - - - - - - - - - - - Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]. - - - - - - - - - - - Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. - - - - - - - - - - - - - Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]. - - - - - - - - - - - Sets the world space transform of the instance. Equivalent to [member Spatial.transform]. - - - - - - - - - - - - - Sets the lightmap to use with this instance. - - - - - - - - - - - Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]. - - - - - - - - - - - Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. - [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. - - - - - - - - - - - Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. - [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. - - - - - - - - - - - - - Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. - [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. - - - - - - - - - - - If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]. - - - - - - - - - - - Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. - - - - - - - - - - - Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. - - - - - - - - - - - Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode]. - - - - - - - - - - - Sets the color of the light. Equivalent to [member Light.light_color]. - - - - - - - - - - - Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]. - - - - - - - - - - - If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative]. - - - - - - - - - - - - - Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]. - - - - - - - - - - - Not implemented in Godot 3.x. - - - - - - - - - - - If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face]. - - - - - - - - - - - If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled]. - - - - - - - - - - - Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]. - - - - - - - - - - - Sets whether GI probes capture light information from this light. - - - - - - - Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - Returns the size of the lightmap capture area. - - - - - - - - - Returns the energy multiplier used by the lightmap capture. - - - - - - - - - Returns the octree used by the lightmap capture. - - - - - - - - - Returns the cell subdivision amount used by this lightmap capture's octree. - - - - - - - - - Returns the cell transform for this lightmap capture's octree. - - - - - - - - - - - Sets the size of the area covered by the lightmap capture. - - - - - - - - - - - Sets the energy multiplier for this lightmap capture. - - - - - - - - - - - Sets the octree to be used by this lightmap capture. - - - - - - - - - - - Sets the subdivision level of this lightmap capture's octree. - - - - - - - - - - - Sets the octree cell transform for this lightmap capture's octree. - - - - - - - - - - - - - Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. - - - - - - - Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Returns the value of a certain material's parameter. - - - - - - - - - - - Sets an object's next material. - - - - - - - - - - - - - Sets a material's parameter. - - - - - - - - - - - Sets a material's render priority. - - - - - - - - - - - Sets a shader material's shader. - - - - - - - - - - - - - - - - - - - - - - - - - - - Removes all surfaces from a mesh. - - - - - - - Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - Returns a mesh's blend shape count. - - - - - - - - - Returns a mesh's blend shape mode. - - - - - - - - - Returns a mesh's custom aabb. - - - - - - - - - Returns a mesh's number of surfaces. - - - - - - - - - - - Sets a mesh's blend shape mode. - - - - - - - - - - - Sets a mesh's custom aabb. - - - - - - - - - - - Returns a mesh's surface's buffer arrays. - - - - - - - - - - - Returns a mesh's surface's arrays for blend shapes. - - - - - - - - - - - - - - - Function is unused in Godot 3.x. - - - - - - - - - - - - - Function is unused in Godot 3.x. - - - - - - - - - - - Returns a mesh's surface's material. - - - - - - - - - - - - - Sets a mesh's surface's material. - - - - - - - - - - - - - - - Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. - - - - - - - - - - - - - - - - - - - - - - - Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. - - - - - - - - - - - - - - - - - Returns the number of instances allocated for this multimesh. - - - - - - - - - Returns the RID of the mesh that will be used in drawing this multimesh. - - - - - - - - - Returns the number of visible instances for this multimesh. - - - - - - - - - - - Returns the color by which the specified instance will be modulated. - - - - - - - - - - - Returns the custom data associated with the specified instance. - - - - - - - - - - - Returns the [Transform] of the specified instance. - - - - - - - - - - - Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. - - - - - - - - - - - - - Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. - - - - - - - - - - - - - Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. - - - - - - - - - - - - - Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. - - - - - - - - - - - - - Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. - - - - - - - - - - - - - - - - - - - - - Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. - - - - - - - - - - - Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. - - - - - - - Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. - - - - - - - Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]. - - - - - - - - - Returns [code]true[/code] if particles are currently set to emitting. - - - - - - - - - Returns [code]true[/code] if particles are not emitting and particles are set to inactive. - - - - - - - - - Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. - - - - - - - - - Reset the particles on the next update. Equivalent to [method Particles.restart]. - - - - - - - - - - - Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]. - - - - - - - - - - - Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]. - - - - - - - - - - - Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order]. - - - - - - - - - - - - - Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]. - - - - - - - - - - - Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]. - - - - - - - - - - - Sets the [Transform] that will be used by the particles when they first emit. - - - - - - - - - - - If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting]. - - - - - - - - - - - Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]. - - - - - - - - - - - Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]. - - - - - - - - - - - If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]. - - - - - - - - - - - Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]. - - - - - - - - - - - If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot]. - - - - - - - - - - - Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess]. - - - - - - - - - - - Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]. - - - - - - - - - - - Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]. - - - - - - - - - - - Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]. - - - - - - - - - - - If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords]. - - - - - - - Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - - - If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. - - - - - - - - - - - Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. - - - - - - - - - - - If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. - - - - - - - - - - - If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. - - - - - - - - - - - Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. - - - - - - - - - - - Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. - - - - - - - - - - - Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. - - - - - - - - - - - Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. - - - - - - - - - - - Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. - - - - - - - - - - - Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. - - - - - - - - - - - Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. - - - - - - - - - - - Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. - - - - - - - - - - - - - Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn. - The callback method must use only 1 argument which will be called with [code]userdata[/code]. - - - - - - - Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - The scenario is the 3D world that all the visual instances exist in. - - - - - - - - - - - Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. - - - - - - - - - - - Sets the environment that will be used with this scenario. - - - - - - - - - - - Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. - - - - - - - - - - - - - - - Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation. - - - - - - - - - If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. - - - - - - - - - Sets the default clear color which is used when a specific clear color has not been selected. - - - - - - - Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - Returns a shader's code. - - - - - - - - - - - Returns a default texture from a shader searched by name. - - - - - - - - - - - - - - - - - - - Returns the parameters of a shader. - - - - - - - - - - - Sets a shader's code. - - - - - - - - - - - - - Sets a shader's default texture. Overwrites the texture given by name. - - - - - - - - - - - - - Allocates the GPU buffers for this skeleton. - - - - - - - - - - - Returns the [Transform] set for a specific bone of this skeleton. - - - - - - - - - - - Returns the [Transform2D] set for a specific bone of this skeleton. - - - - - - - - - - - - - Sets the [Transform] for a specific bone of this skeleton. - - - - - - - - - - - - - Sets the [Transform2D] for a specific bone of this skeleton. - - - - - - - Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - Returns the number of bones allocated for this skeleton. - - - - - - - Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - - - Sets the material that the sky uses to render the background and reflection maps. - - - - - - - Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. - - - - - - - - - - - - - - - - - - - - - - - - - - - Sets a viewport's camera. - - - - - - - - - - - Sets a viewport's canvas. - - - - - - - - - - - - - Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. - For example, you can set the root viewport to not render at all with the following code: - [codeblock] - func _ready(): - get_viewport().set_attach_to_screen_rect(Rect2()) - $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600)) - [/codeblock] - Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen]. - - - - - - - Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] VisualServer functions. - Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. - - - - - - - - - Detaches the viewport from the screen. - - - - - - - - - - - Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. - - - - - - - - - Returns the viewport's last rendered frame. - - - - - - - - - - - Detaches a viewport from a canvas and vice versa. - - - - - - - - - - - If [code]true[/code], sets the viewport active, else sets it inactive. - - - - - - - - - - - - - - - Sets the stacking order for a viewport's canvas. - [code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer. - - - - - - - - - - - - - Sets the transformation of a viewport's canvas. - - - - - - - - - - - Sets the clear mode of a viewport. See [enum ViewportClearMode] for options. - - - - - - - - - - - Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options. - - - - - - - - - - - If [code]true[/code], rendering of a viewport's environment is disabled. - - - - - - - - - - - Sets the viewport's global transformation matrix. - - - - - - - - - - - If [code]true[/code], the viewport's canvas is not rendered. - - - - - - - - - - - Currently unimplemented in Godot 3.x. - - - - - - - - - - - Sets the anti-aliasing mode. See [enum ViewportMSAA] for options. - - - - - - - - - - - Sets the viewport's parent to another viewport. - - - - - - - - - - - If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. - - - - - - - - - - - Sets a viewport's scenario. - The scenario contains information about the [enum ScenarioDebugMode], environment information, reflection atlas etc. - - - - - - - - - - - - - Sets the shadow atlas quadrant's subdivision. - - - - - - - - - - - Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. - - - - - - - - - - - - - Sets the viewport's width and height. - - - - - - - - - - - If [code]true[/code], the viewport renders its background as transparent. - - - - - - - - - - - Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options. - - - - - - - - - - - If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [ARVRInterface]. - - - - - - - Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports. - - - - - Emitted at the beginning of the frame, before the VisualServer updates all the Viewports. - - - - - - Marks an error that shows that the index array is empty. - - - Number of weights/bones per vertex. - - - The minimum Z-layer for canvas items. - - - The maximum Z-layer for canvas items. - - - Max number of glow levels that can be used with glow post-process effect. - - - Unused enum in Godot 3.x. - - - The minimum renderpriority of all materials. - - - The maximum renderpriority of all materials. - - - - - - - - - - - - - - - - - - - - - Shader is a 3D shader. - - - Shader is a 2D shader. - - - Shader is a particle shader. - - - Shader is a sky shader. - - - Represents the size of the [enum ShaderMode] enum. - - - Array is a vertex array. - - - Array is a normal array. - - - Array is a tangent array. - - - Array is a color array. - - - Array is an UV coordinates array. - - - Array is an UV coordinates array for the second UV coordinates. - - - Array contains bone information. - - - Array is weight information. - - - Array is index array. - - - Represents the size of the [enum ArrayType] enum. - - - Flag used to mark a vertex array. - - - Flag used to mark a normal array. - - - Flag used to mark a tangent array. - - - Flag used to mark a color array. - - - Flag used to mark an UV coordinates array. - - - Flag used to mark an UV coordinates array for the second UV coordinates. - - - Flag used to mark a bone information array. - - - Flag used to mark a weights array. - - - Flag used to mark an index array. - - - Flag used to mark a compressed (half float) normal array. - - - Flag used to mark a compressed (half float) tangent array. - - - Flag used to mark a compressed (half float) color array. - - - Flag used to mark a compressed (half float) UV coordinates array. - - - Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. - - - Flag used to mark a compressed index array. - - - Flag used to mark that the array contains 2D vertices. - - - - - Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. - - - Primitive to draw consists of points. - - - Primitive to draw consists of lines. - - - Primitive to draw consists of a line strip from start to end. - - - Primitive to draw consists of triangles. - - - Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). - - - Represents the size of the [enum PrimitiveType] enum. - - - Blend shapes are normalized. - - - Blend shapes are relative to base weight. - - - Use [Transform2D] to store MultiMesh transform. - - - Use [Transform] to store MultiMesh transform. - - - Is a directional (sun) light. - - - Is an omni light. - - - Is a spot light. - - - The light's energy. - - - - - The light's influence on specularity. - - - The light's range. - - - The light's attenuation. - - - The spotlight's angle. - - - The spotlight's attenuation. - - - Scales the shadow color. - - - Max distance that shadows will be rendered. - - - Proportion of shadow atlas occupied by the first split. - - - Proportion of shadow atlas occupied by the second split. - - - Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. - - - - - Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. - - - Bias the shadow lookup to fix self-shadowing artifacts. - - - Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. - - - Represents the size of the [enum LightParam] enum. - - - Use a dual paraboloid shadow map for omni lights. - - - Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. - - - Use orthogonal shadow projection for directional light. - - - Use 2 splits for shadow projection when using directional light. - - - Use 4 splits for shadow projection when using directional light. - - - Keeps shadows stable as camera moves but has lower effective resolution. - - - Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. - - - Reflection probe will update reflections once and then stop. - - - Reflection probe will update each frame. This mode is necessary to capture moving objects. - - - Draw particles in the order that they appear in the particles array. - - - Sort particles based on their lifetime. - - - Sort particles based on their distance to the camera. - - - Do not update the viewport. - - - Update the viewport once then set to disabled. - - - Update the viewport whenever it is visible. - - - Always update the viewport. - - - The viewport is always cleared before drawing. - - - The viewport is never cleared before drawing. - - - The viewport is cleared once, then the clear mode is set to [constant VIEWPORT_CLEAR_NEVER]. - - - Multisample antialiasing is disabled. - - - Multisample antialiasing is set to 2×. - - - Multisample antialiasing is set to 4×. - - - Multisample antialiasing is set to 8×. - - - Multisample antialiasing is set to 16×. - - - Multisample antialiasing is set to 2× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). - - - Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). - - - Number of objects drawn in a single frame. - - - Number of vertices drawn in a single frame. - - - Number of material changes during this frame. - - - Number of shader changes during this frame. - - - Number of surface changes during this frame. - - - Number of draw calls during this frame. - - - Represents the size of the [enum ViewportRenderInfo] enum. - - - Debug draw is disabled. Default setting. - - - Debug draw sets objects to unshaded. - - - - - Overwrites clear color to [code](0,0,0,0)[/code]. - - - Debug draw draws objects in wireframe. - - - - - - - - - - - - - - - - - - - - - - - - - Use the clear color as background. - - - Use a specified color as the background. - - - Use a sky resource for the background. - - - Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. - - - Do not clear the background, use whatever was rendered last frame as the background. - - - Displays a camera feed in the background. - - - Represents the size of the [enum EnvironmentBG] enum. - - - - - - - - - - - - - - - - - - - - - - - - - - - Output color as they came in. - - - Use the Reinhard tonemapper. - - - Use the filmic tonemapper. - - - Use the ACES tonemapper. - - - Disables the blur set for SSAO. Will make SSAO look noisier. - - - Perform a 1x1 blur on the SSAO output. - - - Performs a 2x2 blur on the SSAO output. - - - Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. - - - Lowest quality of screen space ambient occlusion. - - - Medium quality screen space ambient occlusion. - - - Highest quality screen space ambient occlusion. - - - - - - - - - - - - - - - - - - - Do not use a debug mode. - - - Draw all objects as wireframe models. - - - Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. - - - Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. - - - The instance does not have a type. - - - The instance is a mesh. - - - The instance is a multimesh. - - - The instance is an immediate geometry. - - - The instance is a particle emitter. - - - The instance is a light. - - - The instance is a reflection probe. - - - The instance is a GI probe. - - - The instance is a lightmap capture. - - - Represents the size of the [enum InstanceType] enum. - - - A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). - - - Allows the instance to be used in baked lighting. - - - - - When set, manually requests to draw geometry on next frame. - - - Represents the size of the [enum InstanceFlags] enum. - - - Disable shadows from this instance. - - - Cast shadows from this instance. - - - Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. - - - Only render the shadows from the object. The object itself will not be drawn. - - - The nine patch gets stretched where needed. - - - The nine patch gets filled with tiles where needed. - - - The nine patch gets filled with tiles where needed and stretches them a bit if needed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds light color additive to the canvas. - - - Adds light color subtractive to the canvas. - - - The light adds color depending on transparency. - - - The light adds color depending on mask. - - - Do not apply a filter to canvas light shadows. - - - Use PCF5 filtering to filter canvas light shadows. - - - Use PCF13 filtering to filter canvas light shadows. - - - - - Culling of the canvas occluder is disabled. - - - Culling of the canvas occluder is clockwise. - - - Culling of the canvas occluder is counterclockwise. - - - The amount of objects in the frame. - - - The amount of vertices in the frame. - - - The amount of modified materials in the frame. - - - The amount of shader rebinds in the frame. - - - The amount of surface changes in the frame. - - - The amount of draw calls in frame. - - - Unimplemented in the GLES2 rendering backend, always returns 0. - - - The amount of video memory used, i.e. texture and vertex memory combined. - - - The amount of texture memory used. - - - The amount of vertex memory used. - - - Hardware supports shaders. This enum is currently unused in Godot 3.x. - - - Hardware supports multithreading. This enum is currently unused in Godot 3.x. - - - diff --git a/doc/classes/World.xml b/doc/classes/World.xml deleted file mode 100644 index 48596c87d0..0000000000 --- a/doc/classes/World.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - Class that has everything pertaining to a world. - - - Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. - - - https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html - - - - - - - - The World's physics direct space state, used for making various queries. Might be used only during [code]_physics_process[/code]. - - - The World's [Environment]. - - - The World's fallback_environment will be used if the World's [Environment] fails or is missing. - - - The World's visual scenario. - - - The World's physics space. - - - - - diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 9e2d4cfde3..2d8382b7e3 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -13,13 +13,13 @@ - The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing. + The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing. - + The state of this world's physics space. This allows arbitrary querying for collision. - The [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area. + The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area. diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml new file mode 100644 index 0000000000..4224a2a2c3 --- /dev/null +++ b/doc/classes/World3D.xml @@ -0,0 +1,35 @@ + + + + Class that has everything pertaining to a world. + + + Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Node3D nodes register their resources into the current world. + + + https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html + + + + + + + + The World3D's physics direct space state, used for making various queries. Might be used only during [code]_physics_process[/code]. + + + The World3D's [Environment]. + + + The World3D's fallback_environment will be used if the World3D's [Environment] fails or is missing. + + + The World3D's visual scenario. + + + The World3D's physics space. + + + + + diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index 73500868a8..92b75621c2 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -5,7 +5,7 @@ The [WorldEnvironment] node is used to configure the default [Environment] for the scene. - The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. + The parameters defined in the [WorldEnvironment] can be overridden by an [Environment] node set on the current [Camera3D]. Additionally, only one [WorldEnvironment] may be instanced in a given scene at a time. The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. diff --git a/doc/classes/WorldMarginShape.xml b/doc/classes/WorldMarginShape.xml deleted file mode 100644 index 54f76a066b..0000000000 --- a/doc/classes/WorldMarginShape.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Infinite plane shape for 3D collisions. - - - An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane. - - - - - - - - The [Plane] used by the [WorldMarginShape] for collision. - - - - - diff --git a/doc/classes/WorldMarginShape3D.xml b/doc/classes/WorldMarginShape3D.xml new file mode 100644 index 0000000000..a91447056b --- /dev/null +++ b/doc/classes/WorldMarginShape3D.xml @@ -0,0 +1,20 @@ + + + + Infinite plane shape for 3D collisions. + + + An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [WorldMarginShape3D] is used in a [PhysicsBody3D], it will cause colliding objects placed "below" it to teleport "above" the plane. + + + + + + + + The [Plane] used by the [WorldMarginShape3D] for collision. + + + + + diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp index 66134b4428..845e7725f3 100644 --- a/editor/doc_data.cpp +++ b/editor/doc_data.cpp @@ -372,7 +372,7 @@ void DocData::generate(bool p_basic_types) { if (skip_setter_getter_methods && setters_getters.has(E->get().name)) { // Don't skip parametric setters and getters, i.e. method which require // one or more parameters to define what property should be set or retrieved. - // E.g. CPUParticles::set_param(Parameter param, float value). + // E.g. CPUParticles3D::set_param(Parameter param, float value). if (E->get().arguments.size() == 0 /* getter */ || (E->get().arguments.size() == 1 && E->get().return_val.type == Variant::NIL /* setter */)) { continue; } diff --git a/editor/icons/GizmoCPUParticles.svg b/editor/icons/GizmoCPUParticles.svg deleted file mode 100644 index d4e86d9c42..0000000000 --- a/editor/icons/GizmoCPUParticles.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/editor/icons/GizmoCPUParticles3D.svg b/editor/icons/GizmoCPUParticles3D.svg new file mode 100644 index 0000000000..d4e86d9c42 --- /dev/null +++ b/editor/icons/GizmoCPUParticles3D.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/editor/icons/GizmoGPUParticles3D.svg b/editor/icons/GizmoGPUParticles3D.svg new file mode 100644 index 0000000000..1c5d8c5f2d --- /dev/null +++ b/editor/icons/GizmoGPUParticles3D.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/editor/icons/GizmoParticles.svg b/editor/icons/GizmoParticles.svg deleted file mode 100644 index 1c5d8c5f2d..0000000000 --- a/editor/icons/GizmoParticles.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 6c089d7020..f16c3a9e68 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -318,7 +318,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) { } else { //mesh since nothing else node = memnew(MeshInstance3D); - //Object::cast_to(node)->set_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT, true); + //Object::cast_to(node)->set_flag(GeometryInstance3D::FLAG_USE_BAKED_LIGHT, true); } } break; case Collada::Node::TYPE_SKELETON: { diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index fb57773b18..7a1de78001 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -448,7 +448,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map } else if (empty_draw_type == "IMAGE") { WorldMarginShape3D *world_margin_shape = memnew(WorldMarginShape3D); colshape->set_shape(world_margin_shape); - colshape->set_name("WorldMarginShape"); + colshape->set_name("WorldMarginShape3D"); } else { SphereShape3D *sphereShape = memnew(SphereShape3D); sphereShape->set_radius(1); diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp index 40c17a9fc3..b0f7d2e460 100644 --- a/editor/node_3d_editor_gizmos.cpp +++ b/editor/node_3d_editor_gizmos.cpp @@ -1971,7 +1971,7 @@ bool RayCastNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { } String RayCastNode3DGizmoPlugin::get_name() const { - return "RayCast"; + return "RayCast3D"; } int RayCastNode3DGizmoPlugin::get_priority() const { @@ -2025,7 +2025,7 @@ bool SpringArmNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { } String SpringArmNode3DGizmoPlugin::get_name() const { - return "SpringArm"; + return "SpringArm3D"; } int SpringArmNode3DGizmoPlugin::get_priority() const { @@ -2045,7 +2045,7 @@ bool VehicleWheelNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { } String VehicleWheelNode3DGizmoPlugin::get_name() const { - return "VehicleWheel"; + return "VehicleWheel3D"; } int VehicleWheelNode3DGizmoPlugin::get_priority() const { @@ -2119,7 +2119,7 @@ bool SoftBodyNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { } String SoftBodyNode3DGizmoPlugin::get_name() const { - return "SoftBody"; + return "SoftBody3D"; } int SoftBodyNode3DGizmoPlugin::get_priority() const { @@ -2162,7 +2162,7 @@ void SoftBodyNode3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { } String SoftBodyNode3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { - return "SoftBody pin point"; + return "SoftBody3D pin point"; } Variant SoftBodyNode3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { @@ -2195,7 +2195,7 @@ bool VisibilityNotifierGizmoPlugin::has_gizmo(Node3D *p_spatial) { } String VisibilityNotifierGizmoPlugin::get_name() const { - return "VisibilityNotifier"; + return "VisibilityNotifier3D"; } int VisibilityNotifierGizmoPlugin::get_priority() const { @@ -2342,59 +2342,59 @@ void VisibilityNotifierGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { //// -CPUParticlesGizmoPlugin::CPUParticlesGizmoPlugin() { - create_icon_material("particles_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoCPUParticles", "EditorIcons")); +CPUParticles3DGizmoPlugin::CPUParticles3DGizmoPlugin() { + create_icon_material("particles_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoCPUParticles3D", "EditorIcons")); } -bool CPUParticlesGizmoPlugin::has_gizmo(Node3D *p_spatial) { +bool CPUParticles3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { return Object::cast_to(p_spatial) != NULL; } -String CPUParticlesGizmoPlugin::get_name() const { - return "CPUParticles"; +String CPUParticles3DGizmoPlugin::get_name() const { + return "CPUParticles3D"; } -int CPUParticlesGizmoPlugin::get_priority() const { +int CPUParticles3DGizmoPlugin::get_priority() const { return -1; } -bool CPUParticlesGizmoPlugin::is_selectable_when_hidden() const { +bool CPUParticles3DGizmoPlugin::is_selectable_when_hidden() const { return true; } -void CPUParticlesGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { +void CPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { Ref icon = get_material("particles_icon", p_gizmo); p_gizmo->add_unscaled_billboard(icon, 0.05); } //// -ParticlesGizmoPlugin::ParticlesGizmoPlugin() { +GPUParticles3DGizmoPlugin::GPUParticles3DGizmoPlugin() { Color gizmo_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particles", Color(0.8, 0.7, 0.4)); create_material("particles_material", gizmo_color); gizmo_color.a = 0.1; create_material("particles_solid_material", gizmo_color); - create_icon_material("particles_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoParticles", "EditorIcons")); + create_icon_material("particles_icon", Node3DEditor::get_singleton()->get_theme_icon("GizmoGPUParticles3D", "EditorIcons")); create_handle_material("handles"); } -bool ParticlesGizmoPlugin::has_gizmo(Node3D *p_spatial) { +bool GPUParticles3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { return Object::cast_to(p_spatial) != NULL; } -String ParticlesGizmoPlugin::get_name() const { - return "Particles"; +String GPUParticles3DGizmoPlugin::get_name() const { + return "GPUParticles3D"; } -int ParticlesGizmoPlugin::get_priority() const { +int GPUParticles3DGizmoPlugin::get_priority() const { return -1; } -bool ParticlesGizmoPlugin::is_selectable_when_hidden() const { +bool GPUParticles3DGizmoPlugin::is_selectable_when_hidden() const { return true; } -String ParticlesGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { +String GPUParticles3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_idx) const { switch (p_idx) { case 0: return "Size X"; @@ -2407,12 +2407,12 @@ String ParticlesGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, i return ""; } -Variant ParticlesGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { +Variant GPUParticles3DGizmoPlugin::get_handle_value(EditorNode3DGizmo *p_gizmo, int p_idx) const { GPUParticles3D *particles = Object::cast_to(p_gizmo->get_spatial_node()); return particles->get_visibility_aabb(); } -void ParticlesGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { +void GPUParticles3DGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point) { GPUParticles3D *particles = Object::cast_to(p_gizmo->get_spatial_node()); @@ -2464,7 +2464,7 @@ void ParticlesGizmoPlugin::set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Cam } } -void ParticlesGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { +void GPUParticles3DGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel) { GPUParticles3D *particles = Object::cast_to(p_gizmo->get_spatial_node()); @@ -2480,7 +2480,7 @@ void ParticlesGizmoPlugin::commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, ur->commit_action(); } -void ParticlesGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { +void GPUParticles3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) { GPUParticles3D *particles = Object::cast_to(p_gizmo->get_spatial_node()); @@ -3725,7 +3725,7 @@ bool NavigationMeshNode3DGizmoPlugin::has_gizmo(Node3D *p_spatial) { } String NavigationMeshNode3DGizmoPlugin::get_name() const { - return "NavigationRegion"; + return "NavigationRegion3D"; } int NavigationMeshNode3DGizmoPlugin::get_priority() const { diff --git a/editor/node_3d_editor_gizmos.h b/editor/node_3d_editor_gizmos.h index 014b736a0d..f8339b4c6c 100644 --- a/editor/node_3d_editor_gizmos.h +++ b/editor/node_3d_editor_gizmos.h @@ -236,8 +236,8 @@ public: VisibilityNotifierGizmoPlugin(); }; -class CPUParticlesGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(CPUParticlesGizmoPlugin, EditorNode3DGizmoPlugin); +class CPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin { + GDCLASS(CPUParticles3DGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial); @@ -245,12 +245,12 @@ public: int get_priority() const; bool is_selectable_when_hidden() const; void redraw(EditorNode3DGizmo *p_gizmo); - CPUParticlesGizmoPlugin(); + CPUParticles3DGizmoPlugin(); }; -class ParticlesGizmoPlugin : public EditorNode3DGizmoPlugin { +class GPUParticles3DGizmoPlugin : public EditorNode3DGizmoPlugin { - GDCLASS(ParticlesGizmoPlugin, EditorNode3DGizmoPlugin); + GDCLASS(GPUParticles3DGizmoPlugin, EditorNode3DGizmoPlugin); public: bool has_gizmo(Node3D *p_spatial); @@ -264,7 +264,7 @@ public: void set_handle(EditorNode3DGizmo *p_gizmo, int p_idx, Camera3D *p_camera, const Point2 &p_point); void commit_handle(EditorNode3DGizmo *p_gizmo, int p_idx, const Variant &p_restore, bool p_cancel = false); - ParticlesGizmoPlugin(); + GPUParticles3DGizmoPlugin(); }; class ReflectionProbeGizmoPlugin : public EditorNode3DGizmoPlugin { diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp index 3d9b74c2da..759f01135e 100644 --- a/editor/plugins/camera_3d_editor_plugin.cpp +++ b/editor/plugins/camera_3d_editor_plugin.cpp @@ -96,7 +96,7 @@ bool Camera3DEditorPlugin::handles(Object *p_object) const { void Camera3DEditorPlugin::make_visible(bool p_visible) { if (p_visible) { - //Node3DEditor::get_singleton()->set_can_preview(Object::cast_to(p_object)); + //Node3DEditor::get_singleton()->set_can_preview(Object::cast_to(p_object)); } else { Node3DEditor::get_singleton()->set_can_preview(NULL); } diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.h b/editor/plugins/cpu_particles_3d_editor_plugin.h index aac9cc9a2f..796c842e07 100644 --- a/editor/plugins/cpu_particles_3d_editor_plugin.h +++ b/editor/plugins/cpu_particles_3d_editor_plugin.h @@ -72,7 +72,7 @@ class CPUParticles3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "CPUParticles"; } + virtual String get_name() const { return "CPUParticles3D"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.h b/editor/plugins/gpu_particles_2d_editor_plugin.h index 904786ffae..008d04a211 100644 --- a/editor/plugins/gpu_particles_2d_editor_plugin.h +++ b/editor/plugins/gpu_particles_2d_editor_plugin.h @@ -87,7 +87,7 @@ protected: static void _bind_methods(); public: - virtual String get_name() const { return "Particles2D"; } + virtual String get_name() const { return "GPUParticles2D"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.h b/editor/plugins/gpu_particles_3d_editor_plugin.h index d730457d01..cf1cff32c0 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.h +++ b/editor/plugins/gpu_particles_3d_editor_plugin.h @@ -108,7 +108,7 @@ class GPUParticles3DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Particles"; } + virtual String get_name() const { return "GPUParticles3D"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index a4e7b2df08..f7a90b8ab3 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -392,17 +392,17 @@ void MeshInstance3DEditor::_create_outline_mesh() { Ref mesh = node->get_mesh(); if (mesh.is_null()) { - err_dialog->set_text(TTR("MeshInstance lacks a Mesh!")); + err_dialog->set_text(TTR("MeshInstance3D lacks a Mesh.")); err_dialog->popup_centered(); return; } if (mesh->get_surface_count() == 0) { - err_dialog->set_text(TTR("Mesh has not surface to create outlines from!")); + err_dialog->set_text(TTR("Mesh has not surface to create outlines from.")); err_dialog->popup_centered(); return; } else if (mesh->get_surface_count() == 1 && mesh->surface_get_primitive_type(0) != Mesh::PRIMITIVE_TRIANGLES) { - err_dialog->set_text(TTR("Mesh primitive type is not PRIMITIVE_TRIANGLES!")); + err_dialog->set_text(TTR("Mesh primitive type is not PRIMITIVE_TRIANGLES.")); err_dialog->popup_centered(); return; } @@ -410,7 +410,7 @@ void MeshInstance3DEditor::_create_outline_mesh() { Ref mesho = mesh->create_outline(outline_size->get_value()); if (mesho.is_null()) { - err_dialog->set_text(TTR("Could not create outline!")); + err_dialog->set_text(TTR("Could not create outline.")); err_dialog->popup_centered(); return; } @@ -447,7 +447,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() { options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("MeshInstance3D", "EditorIcons")); options->get_popup()->add_item(TTR("Create Trimesh Static Body"), MENU_OPTION_CREATE_STATIC_TRIMESH_BODY); - options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a StaticBody and assigns a polygon-based collision shape to it automatically.\nThis is the most accurate (but slowest) option for collision detection.")); + options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a StaticBody3D and assigns a polygon-based collision shape to it automatically.\nThis is the most accurate (but slowest) option for collision detection.")); options->get_popup()->add_separator(); options->get_popup()->add_item(TTR("Create Trimesh Collision Sibling"), MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE); options->get_popup()->set_item_tooltip(options->get_popup()->get_item_count() - 1, TTR("Creates a polygon-based collision shape.\nThis is the most accurate (but slowest) option for collision detection.")); diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index 658e3ea565..3257db8751 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -82,7 +82,7 @@ void MultiMeshEditor::_populate() { if (!ms_instance) { - err_dialog->set_text(TTR("Mesh source is invalid (not a MeshInstance).")); + err_dialog->set_text(TTR("Mesh source is invalid (not a MeshInstance3D).")); err_dialog->popup_centered(); return; } diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 6f6d06b09d..01868ba77e 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -5919,8 +5919,8 @@ void Node3DEditor::_register_all_gizmos() { add_gizmo_plugin(Ref(memnew(SpringArmNode3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(VehicleWheelNode3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(VisibilityNotifierGizmoPlugin))); - add_gizmo_plugin(Ref(memnew(ParticlesGizmoPlugin))); - add_gizmo_plugin(Ref(memnew(CPUParticlesGizmoPlugin))); + add_gizmo_plugin(Ref(memnew(GPUParticles3DGizmoPlugin))); + add_gizmo_plugin(Ref(memnew(CPUParticles3DGizmoPlugin))); add_gizmo_plugin(Ref(memnew(ReflectionProbeGizmoPlugin))); add_gizmo_plugin(Ref(memnew(GIProbeGizmoPlugin))); // add_gizmo_plugin(Ref(memnew(BakedIndirectLightGizmoPlugin))); diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp index f3729a3e89..cf8ddb84cd 100644 --- a/editor/plugins/path_3d_editor_plugin.cpp +++ b/editor/plugins/path_3d_editor_plugin.cpp @@ -637,7 +637,7 @@ Ref PathNode3DGizmoPlugin::create_gizmo(Node3D *p_spatial) { } String PathNode3DGizmoPlugin::get_name() const { - return "Path"; + return "Path3D"; } int PathNode3DGizmoPlugin::get_priority() const { diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h index ca051295f0..15804faa47 100644 --- a/editor/plugins/path_3d_editor_plugin.h +++ b/editor/plugins/path_3d_editor_plugin.h @@ -103,9 +103,7 @@ public: static Path3DEditorPlugin *singleton; virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref &p_event); - //virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } - //virtual Ref create_spatial_gizmo(Spatial *p_spatial); - virtual String get_name() const { return "Path"; } + virtual String get_name() const { return "Path3D"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.h b/editor/plugins/skeleton_ik_3d_editor_plugin.h index 1466d670ba..88472a2963 100644 --- a/editor/plugins/skeleton_ik_3d_editor_plugin.h +++ b/editor/plugins/skeleton_ik_3d_editor_plugin.h @@ -51,7 +51,7 @@ protected: static void _bind_methods(); public: - virtual String get_name() const { return "SkeletonIK"; } + virtual String get_name() const { return "SkeletonIK3D"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; diff --git a/editor/plugins/sprite_2d_editor_plugin.h b/editor/plugins/sprite_2d_editor_plugin.h index d0ebf9c84e..0add77843b 100644 --- a/editor/plugins/sprite_2d_editor_plugin.h +++ b/editor/plugins/sprite_2d_editor_plugin.h @@ -104,7 +104,7 @@ class Sprite2DEditorPlugin : public EditorPlugin { EditorNode *editor; public: - virtual String get_name() const { return "Sprite"; } + virtual String get_name() const { return "Sprite2D"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 5b3fe1bfac..5f7860e797 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -862,7 +862,7 @@ bool BulletPhysicsServer3D::body_is_ray_pickable(RID p_body) const { PhysicsDirectBodyState3D *BulletPhysicsServer3D::body_get_direct_state(RID p_body) { RigidBodyBullet *body = rigid_body_owner.getornull(p_body); ERR_FAIL_COND_V(!body, NULL); - return BulletPhysicsDirectBodyState::get_singleton(body); + return BulletPhysicsDirectBodyState3D::get_singleton(body); } bool BulletPhysicsServer3D::body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result, bool p_exclude_raycast_shapes) { @@ -1553,14 +1553,14 @@ void BulletPhysicsServer3D::free(RID p_rid) { } void BulletPhysicsServer3D::init() { - BulletPhysicsDirectBodyState::initSingleton(); + BulletPhysicsDirectBodyState3D::initSingleton(); } void BulletPhysicsServer3D::step(float p_deltaTime) { if (!active) return; - BulletPhysicsDirectBodyState::singleton_setDeltaTime(p_deltaTime); + BulletPhysicsDirectBodyState3D::singleton_setDeltaTime(p_deltaTime); for (int i = 0; i < active_spaces_count; ++i) { @@ -1575,7 +1575,7 @@ void BulletPhysicsServer3D::flush_queries() { } void BulletPhysicsServer3D::finish() { - BulletPhysicsDirectBodyState::destroySingleton(); + BulletPhysicsDirectBodyState3D::destroySingleton(); } int BulletPhysicsServer3D::get_process_info(ProcessInfo p_info) { diff --git a/modules/bullet/config.py b/modules/bullet/config.py index 92dbcf5cb0..5fb122efd8 100644 --- a/modules/bullet/config.py +++ b/modules/bullet/config.py @@ -6,8 +6,8 @@ def configure(env): def get_doc_classes(): return [ - "BulletPhysicsDirectBodyState", - "BulletPhysicsServer", + "BulletPhysicsDirectBodyState3D", + "BulletPhysicsServer3D", ] def get_doc_path(): diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml deleted file mode 100644 index 5ea1b810a1..0000000000 --- a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml new file mode 100644 index 0000000000..1c0181bd9c --- /dev/null +++ b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState3D.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/modules/bullet/doc_classes/BulletPhysicsServer.xml b/modules/bullet/doc_classes/BulletPhysicsServer.xml deleted file mode 100644 index af8fb3c02c..0000000000 --- a/modules/bullet/doc_classes/BulletPhysicsServer.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/modules/bullet/doc_classes/BulletPhysicsServer3D.xml b/modules/bullet/doc_classes/BulletPhysicsServer3D.xml new file mode 100644 index 0000000000..b20595b4f6 --- /dev/null +++ b/modules/bullet/doc_classes/BulletPhysicsServer3D.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp index eaac1d650d..4bea9f87c0 100644 --- a/modules/bullet/hinge_joint_bullet.cpp +++ b/modules/bullet/hinge_joint_bullet.cpp @@ -96,7 +96,7 @@ real_t HingeJointBullet::get_hinge_angle() { void HingeJointBullet::set_param(PhysicsServer3D::HingeJointParam p_param, real_t p_value) { switch (p_param) { case PhysicsServer3D::HINGE_JOINT_BIAS: - WARN_DEPRECATED_MSG("The HingeJoint parameter \"bias\" is deprecated."); + WARN_DEPRECATED_MSG("The HingeJoint3D parameter \"bias\" is deprecated."); break; case PhysicsServer3D::HINGE_JOINT_LIMIT_UPPER: hingeConstraint->setLimit(hingeConstraint->getLowerLimit(), p_value, hingeConstraint->getLimitSoftness(), hingeConstraint->getLimitBiasFactor(), hingeConstraint->getLimitRelaxationFactor()); @@ -128,7 +128,7 @@ void HingeJointBullet::set_param(PhysicsServer3D::HingeJointParam p_param, real_ real_t HingeJointBullet::get_param(PhysicsServer3D::HingeJointParam p_param) const { switch (p_param) { case PhysicsServer3D::HINGE_JOINT_BIAS: - WARN_DEPRECATED_MSG("The HingeJoint parameter \"bias\" is deprecated."); + WARN_DEPRECATED_MSG("The HingeJoint3D parameter \"bias\" is deprecated."); return 0; case PhysicsServer3D::HINGE_JOINT_LIMIT_UPPER: return hingeConstraint->getUpperLimit(); diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index b92166e653..6f799843de 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -48,141 +48,141 @@ @author AndreaCatania */ -BulletPhysicsDirectBodyState *BulletPhysicsDirectBodyState::singleton = NULL; +BulletPhysicsDirectBodyState3D *BulletPhysicsDirectBodyState3D::singleton = NULL; -Vector3 BulletPhysicsDirectBodyState::get_total_gravity() const { +Vector3 BulletPhysicsDirectBodyState3D::get_total_gravity() const { Vector3 gVec; B_TO_G(body->btBody->getGravity(), gVec); return gVec; } -float BulletPhysicsDirectBodyState::get_total_angular_damp() const { +float BulletPhysicsDirectBodyState3D::get_total_angular_damp() const { return body->btBody->getAngularDamping(); } -float BulletPhysicsDirectBodyState::get_total_linear_damp() const { +float BulletPhysicsDirectBodyState3D::get_total_linear_damp() const { return body->btBody->getLinearDamping(); } -Vector3 BulletPhysicsDirectBodyState::get_center_of_mass() const { +Vector3 BulletPhysicsDirectBodyState3D::get_center_of_mass() const { Vector3 gVec; B_TO_G(body->btBody->getCenterOfMassPosition(), gVec); return gVec; } -Basis BulletPhysicsDirectBodyState::get_principal_inertia_axes() const { +Basis BulletPhysicsDirectBodyState3D::get_principal_inertia_axes() const { return Basis(); } -float BulletPhysicsDirectBodyState::get_inverse_mass() const { +float BulletPhysicsDirectBodyState3D::get_inverse_mass() const { return body->btBody->getInvMass(); } -Vector3 BulletPhysicsDirectBodyState::get_inverse_inertia() const { +Vector3 BulletPhysicsDirectBodyState3D::get_inverse_inertia() const { Vector3 gVec; B_TO_G(body->btBody->getInvInertiaDiagLocal(), gVec); return gVec; } -Basis BulletPhysicsDirectBodyState::get_inverse_inertia_tensor() const { +Basis BulletPhysicsDirectBodyState3D::get_inverse_inertia_tensor() const { Basis gInertia; B_TO_G(body->btBody->getInvInertiaTensorWorld(), gInertia); return gInertia; } -void BulletPhysicsDirectBodyState::set_linear_velocity(const Vector3 &p_velocity) { +void BulletPhysicsDirectBodyState3D::set_linear_velocity(const Vector3 &p_velocity) { body->set_linear_velocity(p_velocity); } -Vector3 BulletPhysicsDirectBodyState::get_linear_velocity() const { +Vector3 BulletPhysicsDirectBodyState3D::get_linear_velocity() const { return body->get_linear_velocity(); } -void BulletPhysicsDirectBodyState::set_angular_velocity(const Vector3 &p_velocity) { +void BulletPhysicsDirectBodyState3D::set_angular_velocity(const Vector3 &p_velocity) { body->set_angular_velocity(p_velocity); } -Vector3 BulletPhysicsDirectBodyState::get_angular_velocity() const { +Vector3 BulletPhysicsDirectBodyState3D::get_angular_velocity() const { return body->get_angular_velocity(); } -void BulletPhysicsDirectBodyState::set_transform(const Transform &p_transform) { +void BulletPhysicsDirectBodyState3D::set_transform(const Transform &p_transform) { body->set_transform(p_transform); } -Transform BulletPhysicsDirectBodyState::get_transform() const { +Transform BulletPhysicsDirectBodyState3D::get_transform() const { return body->get_transform(); } -void BulletPhysicsDirectBodyState::add_central_force(const Vector3 &p_force) { +void BulletPhysicsDirectBodyState3D::add_central_force(const Vector3 &p_force) { body->apply_central_force(p_force); } -void BulletPhysicsDirectBodyState::add_force(const Vector3 &p_force, const Vector3 &p_pos) { +void BulletPhysicsDirectBodyState3D::add_force(const Vector3 &p_force, const Vector3 &p_pos) { body->apply_force(p_force, p_pos); } -void BulletPhysicsDirectBodyState::add_torque(const Vector3 &p_torque) { +void BulletPhysicsDirectBodyState3D::add_torque(const Vector3 &p_torque) { body->apply_torque(p_torque); } -void BulletPhysicsDirectBodyState::apply_central_impulse(const Vector3 &p_impulse) { +void BulletPhysicsDirectBodyState3D::apply_central_impulse(const Vector3 &p_impulse) { body->apply_central_impulse(p_impulse); } -void BulletPhysicsDirectBodyState::apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse) { +void BulletPhysicsDirectBodyState3D::apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse) { body->apply_impulse(p_pos, p_impulse); } -void BulletPhysicsDirectBodyState::apply_torque_impulse(const Vector3 &p_impulse) { +void BulletPhysicsDirectBodyState3D::apply_torque_impulse(const Vector3 &p_impulse) { body->apply_torque_impulse(p_impulse); } -void BulletPhysicsDirectBodyState::set_sleep_state(bool p_enable) { +void BulletPhysicsDirectBodyState3D::set_sleep_state(bool p_enable) { body->set_activation_state(p_enable); } -bool BulletPhysicsDirectBodyState::is_sleeping() const { +bool BulletPhysicsDirectBodyState3D::is_sleeping() const { return !body->is_active(); } -int BulletPhysicsDirectBodyState::get_contact_count() const { +int BulletPhysicsDirectBodyState3D::get_contact_count() const { return body->collisionsCount; } -Vector3 BulletPhysicsDirectBodyState::get_contact_local_position(int p_contact_idx) const { +Vector3 BulletPhysicsDirectBodyState3D::get_contact_local_position(int p_contact_idx) const { return body->collisions[p_contact_idx].hitLocalLocation; } -Vector3 BulletPhysicsDirectBodyState::get_contact_local_normal(int p_contact_idx) const { +Vector3 BulletPhysicsDirectBodyState3D::get_contact_local_normal(int p_contact_idx) const { return body->collisions[p_contact_idx].hitNormal; } -float BulletPhysicsDirectBodyState::get_contact_impulse(int p_contact_idx) const { +float BulletPhysicsDirectBodyState3D::get_contact_impulse(int p_contact_idx) const { return body->collisions[p_contact_idx].appliedImpulse; } -int BulletPhysicsDirectBodyState::get_contact_local_shape(int p_contact_idx) const { +int BulletPhysicsDirectBodyState3D::get_contact_local_shape(int p_contact_idx) const { return body->collisions[p_contact_idx].local_shape; } -RID BulletPhysicsDirectBodyState::get_contact_collider(int p_contact_idx) const { +RID BulletPhysicsDirectBodyState3D::get_contact_collider(int p_contact_idx) const { return body->collisions[p_contact_idx].otherObject->get_self(); } -Vector3 BulletPhysicsDirectBodyState::get_contact_collider_position(int p_contact_idx) const { +Vector3 BulletPhysicsDirectBodyState3D::get_contact_collider_position(int p_contact_idx) const { return body->collisions[p_contact_idx].hitWorldLocation; } -ObjectID BulletPhysicsDirectBodyState::get_contact_collider_id(int p_contact_idx) const { +ObjectID BulletPhysicsDirectBodyState3D::get_contact_collider_id(int p_contact_idx) const { return body->collisions[p_contact_idx].otherObject->get_instance_id(); } -int BulletPhysicsDirectBodyState::get_contact_collider_shape(int p_contact_idx) const { +int BulletPhysicsDirectBodyState3D::get_contact_collider_shape(int p_contact_idx) const { return body->collisions[p_contact_idx].other_object_shape; } -Vector3 BulletPhysicsDirectBodyState::get_contact_collider_velocity_at_position(int p_contact_idx) const { +Vector3 BulletPhysicsDirectBodyState3D::get_contact_collider_velocity_at_position(int p_contact_idx) const { RigidBodyBullet::CollisionData &colDat = body->collisions.write[p_contact_idx]; btVector3 hitLocation; @@ -194,7 +194,7 @@ Vector3 BulletPhysicsDirectBodyState::get_contact_collider_velocity_at_position( return velocityAtPoint; } -PhysicsDirectSpaceState3D *BulletPhysicsDirectBodyState::get_space_state() { +PhysicsDirectSpaceState3D *BulletPhysicsDirectBodyState3D::get_space_state() { return body->get_space()->get_direct_state(); } @@ -359,7 +359,7 @@ void RigidBodyBullet::dispatch_callbacks() { if (omit_forces_integration) btBody->clearForces(); - BulletPhysicsDirectBodyState *bodyDirect = BulletPhysicsDirectBodyState::get_singleton(this); + BulletPhysicsDirectBodyState3D *bodyDirect = BulletPhysicsDirectBodyState3D::get_singleton(this); Variant variantBodyDirect = bodyDirect; diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h index bce3511282..b73e132103 100644 --- a/modules/bullet/rigid_body_bullet.h +++ b/modules/bullet/rigid_body_bullet.h @@ -45,7 +45,7 @@ class AreaBullet; class SpaceBullet; class btRigidBody; class GodotMotionState; -class BulletPhysicsDirectBodyState; +class BulletPhysicsDirectBodyState3D; /// This class could be used in multi thread with few changes but currently /// is set to be only in one single thread. @@ -53,16 +53,16 @@ class BulletPhysicsDirectBodyState; /// In the system there is only one object at a time that manage all bodies and is /// created by BulletPhysicsServer3D and is held by the "singleton" variable of this class /// Each time something require it, the body must be set again. -class BulletPhysicsDirectBodyState : public PhysicsDirectBodyState3D { - GDCLASS(BulletPhysicsDirectBodyState, PhysicsDirectBodyState3D); +class BulletPhysicsDirectBodyState3D : public PhysicsDirectBodyState3D { + GDCLASS(BulletPhysicsDirectBodyState3D, PhysicsDirectBodyState3D); - static BulletPhysicsDirectBodyState *singleton; + static BulletPhysicsDirectBodyState3D *singleton; public: /// This class avoid the creation of more object of this class static void initSingleton() { if (!singleton) { - singleton = memnew(BulletPhysicsDirectBodyState); + singleton = memnew(BulletPhysicsDirectBodyState3D); } } @@ -75,7 +75,7 @@ public: singleton->deltaTime = p_deltaTime; } - static BulletPhysicsDirectBodyState *get_singleton(RigidBodyBullet *p_body) { + static BulletPhysicsDirectBodyState3D *get_singleton(RigidBodyBullet *p_body) { singleton->body = p_body; return singleton; } @@ -85,7 +85,7 @@ public: real_t deltaTime; private: - BulletPhysicsDirectBodyState() {} + BulletPhysicsDirectBodyState3D() {} public: virtual Vector3 get_total_gravity() const; @@ -187,7 +187,7 @@ public: }; private: - friend class BulletPhysicsDirectBodyState; + friend class BulletPhysicsDirectBodyState3D; // This is required only for Kinematic movement KinematicUtilities *kinematic_utilities; diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index c40a1500f0..b1ff418748 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -885,8 +885,8 @@ void SpaceBullet::update_gravity() { #include "scene/3d/immediate_geometry.h" -static ImmediateGeometry *motionVec(NULL); -static ImmediateGeometry *normalLine(NULL); +static ImmediateGeometry3D *motionVec(NULL); +static ImmediateGeometry3D *normalLine(NULL); static Ref red_mat; static Ref blue_mat; #endif @@ -897,8 +897,8 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f /// Yes I know this is not good, but I've used it as fast debugging hack. /// I'm leaving it here just for speedup the other eventual debugs if (!normalLine) { - motionVec = memnew(ImmediateGeometry); - normalLine = memnew(ImmediateGeometry); + motionVec = memnew(ImmediateGeometry3D); + normalLine = memnew(ImmediateGeometry3D); SceneTree::get_singleton()->get_current_scene()->add_child(motionVec); SceneTree::get_singleton()->get_current_scene()->add_child(normalLine); diff --git a/modules/csg/config.py b/modules/csg/config.py index 38ccc66d91..1634cbd7b4 100644 --- a/modules/csg/config.py +++ b/modules/csg/config.py @@ -6,15 +6,15 @@ def configure(env): def get_doc_classes(): return [ - "CSGBox", - "CSGCombiner", - "CSGCylinder", - "CSGMesh", - "CSGPolygon", - "CSGPrimitive", - "CSGShape", - "CSGSphere", - "CSGTorus", + "CSGBox3D", + "CSGCombiner3D", + "CSGCylinder3D", + "CSGMesh3D", + "CSGPolygon3D", + "CSGPrimitive3D", + "CSGShape3D", + "CSGSphere3D", + "CSGTorus3D", ] def get_doc_path(): diff --git a/modules/csg/doc_classes/CSGBox.xml b/modules/csg/doc_classes/CSGBox.xml deleted file mode 100644 index e2f0f8488a..0000000000 --- a/modules/csg/doc_classes/CSGBox.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - A CSG Box shape. - - - This node allows you to create a box for use with the CSG system. - - - - - - - - Depth of the box measured from the center of the box. - - - Height of the box measured from the center of the box. - - - The material used to render the box. - - - Width of the box measured from the center of the box. - - - - - diff --git a/modules/csg/doc_classes/CSGBox3D.xml b/modules/csg/doc_classes/CSGBox3D.xml new file mode 100644 index 0000000000..492bf68c44 --- /dev/null +++ b/modules/csg/doc_classes/CSGBox3D.xml @@ -0,0 +1,29 @@ + + + + A CSG Box shape. + + + This node allows you to create a box for use with the CSG system. + + + + + + + + Depth of the box measured from the center of the box. + + + Height of the box measured from the center of the box. + + + The material used to render the box. + + + Width of the box measured from the center of the box. + + + + + diff --git a/modules/csg/doc_classes/CSGCombiner.xml b/modules/csg/doc_classes/CSGCombiner.xml deleted file mode 100644 index ab95d3c3ee..0000000000 --- a/modules/csg/doc_classes/CSGCombiner.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - A CSG node that allows you to combine other CSG modifiers. - - - For complex arrangements of shapes, it is sometimes needed to add structure to your CSG nodes. The CSGCombiner node allows you to create this structure. The node encapsulates the result of the CSG operations of its children. In this way, it is possible to do operations on one set of shapes that are children of one CSGCombiner node, and a set of separate operations on a second set of shapes that are children of a second CSGCombiner node, and then do an operation that takes the two end results as its input to create the final shape. - - - - - - - - diff --git a/modules/csg/doc_classes/CSGCombiner3D.xml b/modules/csg/doc_classes/CSGCombiner3D.xml new file mode 100644 index 0000000000..b55111eee4 --- /dev/null +++ b/modules/csg/doc_classes/CSGCombiner3D.xml @@ -0,0 +1,15 @@ + + + + A CSG node that allows you to combine other CSG modifiers. + + + For complex arrangements of shapes, it is sometimes needed to add structure to your CSG nodes. The CSGCombiner3D node allows you to create this structure. The node encapsulates the result of the CSG operations of its children. In this way, it is possible to do operations on one set of shapes that are children of one CSGCombiner3D node, and a set of separate operations on a second set of shapes that are children of a second CSGCombiner3D node, and then do an operation that takes the two end results as its input to create the final shape. + + + + + + + + diff --git a/modules/csg/doc_classes/CSGCylinder.xml b/modules/csg/doc_classes/CSGCylinder.xml deleted file mode 100644 index 2dd8c6a8d0..0000000000 --- a/modules/csg/doc_classes/CSGCylinder.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - A CSG Cylinder shape. - - - This node allows you to create a cylinder (or cone) for use with the CSG system. - - - - - - - - If [code]true[/code] a cone is created, the [member radius] will only apply to one side. - - - The height of the cylinder. - - - The material used to render the cylinder. - - - The radius of the cylinder. - - - The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. - - - If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look. - - - - - diff --git a/modules/csg/doc_classes/CSGCylinder3D.xml b/modules/csg/doc_classes/CSGCylinder3D.xml new file mode 100644 index 0000000000..bfd2a5d5f2 --- /dev/null +++ b/modules/csg/doc_classes/CSGCylinder3D.xml @@ -0,0 +1,35 @@ + + + + A CSG Cylinder shape. + + + This node allows you to create a cylinder (or cone) for use with the CSG system. + + + + + + + + If [code]true[/code] a cone is created, the [member radius] will only apply to one side. + + + The height of the cylinder. + + + The material used to render the cylinder. + + + The radius of the cylinder. + + + The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. + + + If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look. + + + + + diff --git a/modules/csg/doc_classes/CSGMesh.xml b/modules/csg/doc_classes/CSGMesh.xml deleted file mode 100644 index f1fe2c286b..0000000000 --- a/modules/csg/doc_classes/CSGMesh.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - A CSG Mesh shape that uses a mesh resource. - - - This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more then two faces. - - - - - - - - The [Material] used in drawing the CSG shape. - - - The [Mesh] resource to use as a CSG shape. - - - - - diff --git a/modules/csg/doc_classes/CSGMesh3D.xml b/modules/csg/doc_classes/CSGMesh3D.xml new file mode 100644 index 0000000000..1bab8f4ee9 --- /dev/null +++ b/modules/csg/doc_classes/CSGMesh3D.xml @@ -0,0 +1,23 @@ + + + + A CSG Mesh shape that uses a mesh resource. + + + This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more then two faces. + + + + + + + + The [Material] used in drawing the CSG shape. + + + The [Mesh] resource to use as a CSG shape. + + + + + diff --git a/modules/csg/doc_classes/CSGPolygon.xml b/modules/csg/doc_classes/CSGPolygon.xml deleted file mode 100644 index 02b2e8b03f..0000000000 --- a/modules/csg/doc_classes/CSGPolygon.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - Extrudes a 2D polygon shape to create a 3D mesh. - - - This node takes a 2D polygon shape and extrudes it to create a 3D mesh. - - - - - - - - Extrusion depth when [member mode] is [constant MODE_DEPTH]. - - - Material to use for the resulting mesh. - - - Extrusion mode. - - - If [code]true[/code] the u component of our uv will continuously increase in unison with the distance traveled along our path when [member mode] is [constant MODE_PATH]. - - - Interval at which a new extrusion slice is added along the path when [member mode] is [constant MODE_PATH]. - - - If [code]true[/code] the start and end of our path are joined together ensuring there is no seam when [member mode] is [constant MODE_PATH]. - - - If [code]false[/code] we extrude centered on our path, if [code]true[/code] we extrude in relation to the position of our CSGPolygon when [member mode] is [constant MODE_PATH]. - - - The [Shape] object containing the path along which we extrude when [member mode] is [constant MODE_PATH]. - - - The method by which each slice is rotated along the path when [member mode] is [constant MODE_PATH]. - - - Point array that defines the shape that we'll extrude. - - - Generates smooth normals so smooth shading is applied to our mesh. - - - Degrees to rotate our extrusion for each slice when [member mode] is [constant MODE_SPIN]. - - - Number of extrusion when [member mode] is [constant MODE_SPIN]. - - - - - Shape is extruded to [member depth]. - - - Shape is extruded by rotating it around an axis. - - - Shape is extruded along a path set by a [Shape] set in [member path_node]. - - - Slice is not rotated. - - - Slice is rotated around the up vector of the path. - - - Slice is rotate to match the path exactly. - - - diff --git a/modules/csg/doc_classes/CSGPolygon3D.xml b/modules/csg/doc_classes/CSGPolygon3D.xml new file mode 100644 index 0000000000..c55fa0983e --- /dev/null +++ b/modules/csg/doc_classes/CSGPolygon3D.xml @@ -0,0 +1,74 @@ + + + + Extrudes a 2D polygon shape to create a 3D mesh. + + + This node takes a 2D polygon shape and extrudes it to create a 3D mesh. + + + + + + + + Extrusion depth when [member mode] is [constant MODE_DEPTH]. + + + Material to use for the resulting mesh. + + + Extrusion mode. + + + If [code]true[/code] the u component of our uv will continuously increase in unison with the distance traveled along our path when [member mode] is [constant MODE_PATH]. + + + Interval at which a new extrusion slice is added along the path when [member mode] is [constant MODE_PATH]. + + + If [code]true[/code] the start and end of our path are joined together ensuring there is no seam when [member mode] is [constant MODE_PATH]. + + + If [code]false[/code] we extrude centered on our path, if [code]true[/code] we extrude in relation to the position of our CSGPolygon3D when [member mode] is [constant MODE_PATH]. + + + The [Shape3D] object containing the path along which we extrude when [member mode] is [constant MODE_PATH]. + + + The method by which each slice is rotated along the path when [member mode] is [constant MODE_PATH]. + + + Point array that defines the shape that we'll extrude. + + + Generates smooth normals so smooth shading is applied to our mesh. + + + Degrees to rotate our extrusion for each slice when [member mode] is [constant MODE_SPIN]. + + + Number of extrusion when [member mode] is [constant MODE_SPIN]. + + + + + Shape3D is extruded to [member depth]. + + + Shape3D is extruded by rotating it around an axis. + + + Shape3D is extruded along a path set by a [Shape3D] set in [member path_node]. + + + Slice is not rotated. + + + Slice is rotated around the up vector of the path. + + + Slice is rotate to match the path exactly. + + + diff --git a/modules/csg/doc_classes/CSGPrimitive.xml b/modules/csg/doc_classes/CSGPrimitive.xml deleted file mode 100644 index ba395b7edd..0000000000 --- a/modules/csg/doc_classes/CSGPrimitive.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Base class for CSG primitives. - - - Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it. - - - - - - - - Invert the faces of the mesh. - - - - - diff --git a/modules/csg/doc_classes/CSGPrimitive3D.xml b/modules/csg/doc_classes/CSGPrimitive3D.xml new file mode 100644 index 0000000000..31b7360fac --- /dev/null +++ b/modules/csg/doc_classes/CSGPrimitive3D.xml @@ -0,0 +1,20 @@ + + + + Base class for CSG primitives. + + + Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it. + + + + + + + + Invert the faces of the mesh. + + + + + diff --git a/modules/csg/doc_classes/CSGShape.xml b/modules/csg/doc_classes/CSGShape.xml deleted file mode 100644 index 64a2fb1840..0000000000 --- a/modules/csg/doc_classes/CSGShape.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - The CSG base class. - - - This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. - - - - - - - - - - - Returns an individual bit on the collision mask. - - - - - - - - - Returns an individual bit on the collision mask. - - - - - - - Returns an [Array] with two elements, the first is the [Transform] of this node and the second is the root [Mesh] of this node. Only works when this node is the root shape. - - - - - - - Returns [code]true[/code] if this is a root shape and is thus the object that is rendered. - - - - - - - - - - - Sets individual bits on the layer mask. Use this if you only need to change one layer's value. - - - - - - - - - - - Sets individual bits on the collision mask. Use this if you only need to change one layer's value. - - - - - - Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. - - - The physics layers this area is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - - - The physics layers this CSG shape scans for collisions. - - - The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. - - - Snap makes the mesh snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. - - - Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. - - - - - Geometry of both primitives is merged, intersecting geometry is removed. - - - Only intersecting geometry remains, the rest is removed. - - - The second shape is subtracted from the first, leaving a dent with its shape. - - - diff --git a/modules/csg/doc_classes/CSGShape3D.xml b/modules/csg/doc_classes/CSGShape3D.xml new file mode 100644 index 0000000000..43ce988c30 --- /dev/null +++ b/modules/csg/doc_classes/CSGShape3D.xml @@ -0,0 +1,100 @@ + + + + The CSG base class. + + + This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. + + + + + + + + + + + Returns an individual bit on the collision mask. + + + + + + + + + Returns an individual bit on the collision mask. + + + + + + + Returns an [Array] with two elements, the first is the [Transform] of this node and the second is the root [Mesh] of this node. Only works when this node is the root shape. + + + + + + + Returns [code]true[/code] if this is a root shape and is thus the object that is rendered. + + + + + + + + + + + Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + + + + + + + + + + + Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + + + + + + Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. + + + The physics layers this area is in. + Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. + + + The physics layers this CSG shape scans for collisions. + + + The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. + + + Snap makes the mesh snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. + + + Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. + + + + + Geometry of both primitives is merged, intersecting geometry is removed. + + + Only intersecting geometry remains, the rest is removed. + + + The second shape is subtracted from the first, leaving a dent with its shape. + + + diff --git a/modules/csg/doc_classes/CSGSphere.xml b/modules/csg/doc_classes/CSGSphere.xml deleted file mode 100644 index 847cc63586..0000000000 --- a/modules/csg/doc_classes/CSGSphere.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - A CSG Sphere shape. - - - This node allows you to create a sphere for use with the CSG system. - - - - - - - - The material used to render the sphere. - - - Number of vertical slices for the sphere. - - - Radius of the sphere. - - - Number of horizontal slices for the sphere. - - - If [code]true[/code] the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If [code]false[/code] the sphere will have a flat shaded look. - - - - - diff --git a/modules/csg/doc_classes/CSGSphere3D.xml b/modules/csg/doc_classes/CSGSphere3D.xml new file mode 100644 index 0000000000..4d5b3be099 --- /dev/null +++ b/modules/csg/doc_classes/CSGSphere3D.xml @@ -0,0 +1,32 @@ + + + + A CSG Sphere shape. + + + This node allows you to create a sphere for use with the CSG system. + + + + + + + + The material used to render the sphere. + + + Number of vertical slices for the sphere. + + + Radius of the sphere. + + + Number of horizontal slices for the sphere. + + + If [code]true[/code] the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If [code]false[/code] the sphere will have a flat shaded look. + + + + + diff --git a/modules/csg/doc_classes/CSGTorus.xml b/modules/csg/doc_classes/CSGTorus.xml deleted file mode 100644 index 84a08edaf5..0000000000 --- a/modules/csg/doc_classes/CSGTorus.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - A CSG Torus shape. - - - This node allows you to create a torus for use with the CSG system. - - - - - - - - The inner radius of the torus. - - - The material used to render the torus. - - - The outer radius of the torus. - - - The number of edges each ring of the torus is constructed of. - - - The number of slices the torus is constructed of. - - - If [code]true[/code] the normals of the torus are set to give a smooth effect making the torus seem rounded. If [code]false[/code] the torus will have a flat shaded look. - - - - - diff --git a/modules/csg/doc_classes/CSGTorus3D.xml b/modules/csg/doc_classes/CSGTorus3D.xml new file mode 100644 index 0000000000..abe3eab913 --- /dev/null +++ b/modules/csg/doc_classes/CSGTorus3D.xml @@ -0,0 +1,35 @@ + + + + A CSG Torus shape. + + + This node allows you to create a torus for use with the CSG system. + + + + + + + + The inner radius of the torus. + + + The material used to render the torus. + + + The outer radius of the torus. + + + The number of edges each ring of the torus is constructed of. + + + The number of slices the torus is constructed of. + + + If [code]true[/code] the normals of the torus are set to give a smooth effect making the torus seem rounded. If [code]false[/code] the torus will have a flat shaded look. + + + + + diff --git a/modules/csg/register_types.cpp b/modules/csg/register_types.cpp index 1a12a6706d..40eef84b1b 100644 --- a/modules/csg/register_types.cpp +++ b/modules/csg/register_types.cpp @@ -47,15 +47,6 @@ void register_csg_types() { ClassDB::register_class(); ClassDB::register_class(); - ClassDB::add_compatibility_class("CSGShape", "CSGShape3D"); - ClassDB::add_compatibility_class("CSGMesh", "CSGMesh3D"); - ClassDB::add_compatibility_class("CSGSphere", "CSGSphere3D"); - ClassDB::add_compatibility_class("CSGBox", "CSGBox3D"); - ClassDB::add_compatibility_class("CSGCylinder", "CSGCylinder3D"); - ClassDB::add_compatibility_class("CSGTorus", "CSGTorus3D"); - ClassDB::add_compatibility_class("CSGPolygon", "CSGPolygon3D"); - ClassDB::add_compatibility_class("CSGCombiner", "CSGCombiner3D"); - #ifdef TOOLS_ENABLED EditorPlugins::add_by_type(); #endif diff --git a/modules/gdnavigation/nav_map.cpp b/modules/gdnavigation/nav_map.cpp index 338e49eb9f..adb59f5e51 100644 --- a/modules/gdnavigation/nav_map.cpp +++ b/modules/gdnavigation/nav_map.cpp @@ -657,7 +657,7 @@ void NavMap::sync() { connection->get().B->edges[connection->get().B_edge].other_edge = connection->get().A_edge; } else { // The edge is already connected with another edge, skip. - ERR_PRINT("Attempted to merge a navigation mesh triangle edge with another already-merged edge. This happens when the Navigation's `cell_size` is different from the one used to generate the navigation mesh. This will cause navigation problem."); + ERR_PRINT("Attempted to merge a navigation mesh triangle edge with another already-merged edge. This happens when the Navigation3D's `cell_size` is different from the one used to generate the navigation mesh. This will cause navigation problem."); } } } diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index 2f6f9f30a4..4718c864a3 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -1216,7 +1216,7 @@ Returns whether the given class exists in [ClassDB]. [codeblock] - type_exists("Sprite") # Returns true + type_exists("Sprite2D") # Returns true type_exists("Variant") # Returns false [/codeblock] diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index 37ebb3e5d5..a213069e19 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -1,5 +1,5 @@ - + Node for 3D tile-based maps. diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs index a0f105d55e..c4c911b863 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DynamicObject.cs @@ -23,7 +23,7 @@ namespace Godot /// /// This sample shows how to use to dynamically access the engine members of a . /// - /// dynamic sprite = GetNode("Sprite").DynamicGodotObject; + /// dynamic sprite = GetNode("Sprite2D").DynamicGodotObject; /// sprite.add_child(this); /// /// if ((sprite.hframes * sprite.vframes) > 0) diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index ba604c086e..47465f727e 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1145,7 +1145,7 @@ void CPUParticles2D::_notification(int p_what) { void CPUParticles2D::convert_from_particles(Node *p_particles) { GPUParticles2D *particles = Object::cast_to(p_particles); - ERR_FAIL_COND_MSG(!particles, "Only Particles2D nodes can be converted to CPUParticles2D."); + ERR_FAIL_COND_MSG(!particles, "Only GPUParticles2D nodes can be converted to CPUParticles2D."); set_emitting(particles->is_emitting()); set_amount(particles->get_amount()); diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index fd9706eb2a..de3f8fa09e 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -229,7 +229,7 @@ bool GPUParticles2D::get_fractional_delta() const { String GPUParticles2D::get_configuration_warning() const { if (RenderingServer::get_singleton()->is_low_end()) { - return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles2D node instead. You can use the \"Convert to CPUParticles\" option for this purpose."); + return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles2D node instead. You can use the \"Convert to CPUParticles2D\" option for this purpose."); } String warnings; diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 942d2aac24..d866906ca5 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -157,7 +157,7 @@ void PhysicsBody2D::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); PhysicsBody2D *physics_body = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody type."); + ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody2D type."); PhysicsServer2D::get_singleton()->body_add_collision_exception(get_rid(), physics_body->get_rid()); } @@ -165,7 +165,7 @@ void PhysicsBody2D::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); PhysicsBody2D *physics_body = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody type."); + ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody2D type."); PhysicsServer2D::get_singleton()->body_remove_collision_exception(get_rid(), physics_body->get_rid()); } diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index da37ca8ae2..6ee0512546 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -374,7 +374,7 @@ String CollisionObject3D::get_configuration_warning() const { if (!warning.empty()) { warning += "\n\n"; } - warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape or CollisionPolygon as a child to define its shape."); + warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape3D or CollisionPolygon3D as a child to define its shape."); } return warning; diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index c8b1b728bc..982205137b 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -165,11 +165,11 @@ bool CollisionPolygon3D::is_disabled() const { String CollisionPolygon3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("CollisionPolygon only serves to provide a collision shape to a CollisionObject derived node. Please only use it as a child of Area, StaticBody, RigidBody, KinematicBody, etc. to give them a shape."); + return TTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); } if (polygon.empty()) { - return TTR("An empty CollisionPolygon has no effect on collision."); + return TTR("An empty CollisionPolygon3D has no effect on collision."); } return String(); diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index e736f20614..6aecfd08cc 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -29,6 +29,10 @@ /*************************************************************************/ #include "collision_shape_3d.h" + +#include "core/math/quick_hull.h" +#include "mesh_instance_3d.h" +#include "physics_body_3d.h" #include "scene/resources/box_shape_3d.h" #include "scene/resources/capsule_shape_3d.h" #include "scene/resources/concave_polygon_shape_3d.h" @@ -37,10 +41,8 @@ #include "scene/resources/sphere_shape_3d.h" #include "scene/resources/world_margin_shape_3d.h" #include "servers/rendering_server.h" + //TODO: Implement CylinderShape and HeightMapShape? -#include "core/math/quick_hull.h" -#include "mesh_instance_3d.h" -#include "physics_body_3d.h" void CollisionShape3D::make_convex_from_brothers() { @@ -116,17 +118,17 @@ void CollisionShape3D::resource_changed(RES res) { String CollisionShape3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("CollisionShape only serves to provide a collision shape to a CollisionObject derived node. Please only use it as a child of Area, StaticBody, RigidBody, KinematicBody, etc. to give them a shape."); + return TTR("CollisionShape3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); } if (!shape.is_valid()) { - return TTR("A shape must be provided for CollisionShape to function. Please create a shape resource for it."); + return TTR("A shape must be provided for CollisionShape3D to function. Please create a shape resource for it."); } if (Object::cast_to(get_parent())) { if (Object::cast_to(*shape)) { if (Object::cast_to(get_parent())->get_mode() != RigidBody3D::MODE_STATIC) { - return TTR("ConcavePolygonShape doesn't support RigidBody in another mode than static."); + return TTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."); } } } diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 4350d4da25..2226b0ed83 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -228,7 +228,7 @@ String CPUParticles3D::get_configuration_warning() const { get_param_curve(PARAM_ANIM_SPEED).is_valid() || get_param_curve(PARAM_ANIM_OFFSET).is_valid())) { if (warnings != String()) warnings += "\n"; - warnings += "- " + TTR("CPUParticles animation requires the usage of a StandardMaterial3D whose Billboard Mode is set to \"Particle Billboard\"."); + warnings += "- " + TTR("CPUParticles3D animation requires the usage of a StandardMaterial3D whose Billboard Mode is set to \"Particle Billboard\"."); } return warnings; @@ -1206,7 +1206,7 @@ void CPUParticles3D::_notification(int p_what) { void CPUParticles3D::convert_from_particles(Node *p_particles) { GPUParticles3D *particles = Object::cast_to(p_particles); - ERR_FAIL_COND_MSG(!particles, "Only Particles nodes can be converted to CPUParticles."); + ERR_FAIL_COND_MSG(!particles, "Only GPUParticles3D nodes can be converted to CPUParticles3D."); set_emitting(particles->is_emitting()); set_amount(particles->get_amount()); diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index ad45228ca8..8646d4f290 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -241,7 +241,7 @@ bool GPUParticles3D::get_fractional_delta() const { String GPUParticles3D::get_configuration_warning() const { if (RenderingServer::get_singleton()->is_low_end()) { - return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles node instead. You can use the \"Convert to CPUParticles\" option for this purpose."); + return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles3D node instead. You can use the \"Convert to CPUParticles3D\" option for this purpose."); } String warnings; diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 7fc7fe2bf5..be3b369724 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -336,7 +336,7 @@ Light3D::Light3D(RenderingServer::LightType p_type) { Light3D::Light3D() { type = RenderingServer::LIGHT_DIRECTIONAL; - ERR_PRINT("Light should not be instanced directly; use the DirectionalLight, OmniLight or SpotLight subtypes instead."); + ERR_PRINT("Light3D should not be instanced directly; use the DirectionalLight3D, OmniLight3D or SpotLight3D subtypes instead."); } Light3D::~Light3D() { @@ -464,7 +464,7 @@ String SpotLight3D::get_configuration_warning() const { warning += "\n\n"; } - warning += TTR("A SpotLight with an angle wider than 90 degrees cannot cast shadows."); + warning += TTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows."); } return warning; diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index 76f1d4688d..a131684a8a 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -298,7 +298,7 @@ void NavigationAgent3D::_avoidance_done(Vector3 p_new_velocity) { String NavigationAgent3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("The NavigationAgent can be used only under a spatial node."); + return TTR("The NavigationAgent3D can be used only under a spatial node."); } return String(); diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index 63c273b4ca..fa976e5d18 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -118,7 +118,7 @@ Node *NavigationObstacle3D::get_navigation_node() const { String NavigationObstacle3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("The NavigationObstacle only serves to provide collision avoidance to a spatial object."); + return TTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object."); } return String(); diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 4bb2c72172..08c0fbf4d1 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "navigation_region_3d.h" + #include "core/os/thread.h" #include "mesh_instance_3d.h" #include "navigation_3d.h" @@ -214,7 +215,7 @@ String NavigationRegion3D::get_configuration_warning() const { c = Object::cast_to(c->get_parent()); } - return TTR("NavigationRegion must be a child or grandchild to a Navigation node. It only provides navigation data."); + return TTR("NavigationRegion3D must be a child or grandchild to a Navigation3D node. It only provides navigation data."); } void NavigationRegion3D::_bind_methods() { diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 2169f664ea..0f1f9bb8a7 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -262,11 +262,11 @@ String PathFollow3D::get_configuration_warning() const { return String(); if (!Object::cast_to(get_parent())) { - return TTR("PathFollow only works when set as a child of a Path node."); + return TTR("PathFollow3D only works when set as a child of a Path3D node."); } else { Path3D *path = Object::cast_to(get_parent()); if (path->get_curve().is_valid() && !path->get_curve()->is_up_vector_enabled() && rotation_mode == ROTATION_ORIENTED) { - return TTR("PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path's Curve resource."); + return TTR("PathFollow3D's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path3D's Curve resource."); } } diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 680d6e8594..37981f914c 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -128,7 +128,7 @@ void PhysicsBody3D::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->body_add_collision_exception(get_rid(), collision_object->get_rid()); } @@ -136,7 +136,7 @@ void PhysicsBody3D::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->body_remove_collision_exception(get_rid(), collision_object->get_rid()); } @@ -406,7 +406,7 @@ void RigidBody3D::_direct_state_changed(Object *p_state) { _RigidBodyInOut *toadd = (_RigidBodyInOut *)alloca(state->get_contact_count() * sizeof(_RigidBodyInOut)); int toadd_count = 0; //state->get_contact_count(); - RigidBody_RemoveAction *toremove = (RigidBody_RemoveAction *)alloca(rc * sizeof(RigidBody_RemoveAction)); + RigidBody3D_RemoveAction *toremove = (RigidBody3D_RemoveAction *)alloca(rc * sizeof(RigidBody3D_RemoveAction)); int toremove_count = 0; //put the ones to add @@ -794,7 +794,7 @@ String RigidBody3D::get_configuration_warning() const { if (warning != String()) { warning += "\n\n"; } - warning += TTR("Size changes to RigidBody (in character or rigid modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); + warning += TTR("Size changes to RigidBody3D (in character or rigid modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); } return warning; @@ -864,7 +864,7 @@ void RigidBody3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody3D::get_colliding_bodies); - BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState"))); + BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState3D"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index ed7cfa8733..bf7854b68d 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -156,7 +156,7 @@ protected: tagged = false; } }; - struct RigidBody_RemoveAction { + struct RigidBody3D_RemoveAction { ObjectID body_id; ShapePair pair; diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index ee9ce1dd71..6d2808cfce 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "soft_body_3d.h" + #include "core/list.h" #include "core/object.h" #include "core/os/os.h" @@ -402,7 +403,7 @@ String SoftBody3D::get_configuration_warning() const { if (!warning.empty()) warning += "\n\n"; - warning += TTR("Size changes to SoftBody will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); + warning += TTR("Size changes to SoftBody3D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); } return warning; @@ -585,14 +586,14 @@ Array SoftBody3D::get_collision_exceptions() { void SoftBody3D::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->soft_body_add_collision_exception(physics_rid, collision_object->get_rid()); } void SoftBody3D::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->soft_body_remove_collision_exception(physics_rid, collision_object->get_rid()); } diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 5984b776b2..ac7608a3d5 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -105,7 +105,7 @@ void VehicleWheel3D::_notification(int p_what) { String VehicleWheel3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("VehicleWheel serves to provide a wheel system to a VehicleBody. Please use it as a child of a VehicleBody."); + return TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."); } return String(); @@ -285,7 +285,7 @@ void VehicleWheel3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); - ADD_GROUP("VehicleBody Motion", ""); + ADD_GROUP("VehicleBody3D Motion", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering"); ADD_GROUP("Wheel", "wheel_"); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 774d943efe..e73e560656 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -754,6 +754,8 @@ void register_scene_types() { ClassDB::add_compatibility_class("Area", "Area3D"); ClassDB::add_compatibility_class("BoneAttachment", "BoneAttachment3D"); ClassDB::add_compatibility_class("BoxShape", "BoxShape3D"); + ClassDB::add_compatibility_class("BulletPhysicsDirectBodyState", "BulletPhysicsDirectBodyState3D"); + ClassDB::add_compatibility_class("BulletPhysicsServer", "BulletPhysicsServer3D"); ClassDB::add_compatibility_class("Camera", "Camera3D"); ClassDB::add_compatibility_class("CapsuleShape", "CapsuleShape3D"); ClassDB::add_compatibility_class("ClippedCamera", "ClippedCamera3D"); @@ -764,8 +766,19 @@ void register_scene_types() { ClassDB::add_compatibility_class("ConeTwistJoint", "ConeTwistJoint3D"); ClassDB::add_compatibility_class("ConvexPolygonShape", "ConvexPolygonShape3D"); ClassDB::add_compatibility_class("CPUParticles", "CPUParticles3D"); + ClassDB::add_compatibility_class("CSGBox", "CSGBox3D"); + ClassDB::add_compatibility_class("CSGCombiner", "CSGCombiner3D"); + ClassDB::add_compatibility_class("CSGCylinder", "CSGCylinder3D"); + ClassDB::add_compatibility_class("CSGMesh", "CSGMesh3D"); + ClassDB::add_compatibility_class("CSGPolygon", "CSGPolygon3D"); + ClassDB::add_compatibility_class("CSGPrimitive", "CSGPrimitive3D"); + ClassDB::add_compatibility_class("CSGShape", "CSGShape3D"); + ClassDB::add_compatibility_class("CSGSphere", "CSGSphere3D"); + ClassDB::add_compatibility_class("CSGTorus", "CSGTorus3D"); ClassDB::add_compatibility_class("CylinderShape", "CylinderShape3D"); ClassDB::add_compatibility_class("DirectionalLight", "DirectionalLight3D"); + ClassDB::add_compatibility_class("EditorSpatialGizmo", "EditorNode3DGizmo"); + ClassDB::add_compatibility_class("EditorSpatialGizmoPlugin", "EditorNode3DGizmoPlugin"); ClassDB::add_compatibility_class("Generic6DOFJoint", "Generic6DOFJoint3D"); ClassDB::add_compatibility_class("HeightMapShape", "HeightMapShape3D"); ClassDB::add_compatibility_class("HingeJoint", "HingeJoint3D"); @@ -783,6 +796,8 @@ void register_scene_types() { ClassDB::add_compatibility_class("NavigationObstacle", "NavigationObstacle3D"); ClassDB::add_compatibility_class("NavigationPolygonInstance", "NavigationRegion2D"); ClassDB::add_compatibility_class("NavigationRegion", "NavigationRegion3D"); + ClassDB::add_compatibility_class("Navigation2DServer", "NavigationServer2D"); + ClassDB::add_compatibility_class("NavigationServer", "NavigationServer3D"); ClassDB::add_compatibility_class("OmniLight", "OmniLight3D"); ClassDB::add_compatibility_class("Particles", "GPUParticles3D"); ClassDB::add_compatibility_class("Particles2D", "GPUParticles2D"); @@ -816,6 +831,7 @@ void register_scene_types() { ClassDB::add_compatibility_class("SliderJoint", "SliderJoint3D"); ClassDB::add_compatibility_class("SoftBody", "SoftBody3D"); ClassDB::add_compatibility_class("Spatial", "Node3D"); + ClassDB::add_compatibility_class("SpatialGizmo", "Node3DGizmo"); ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D"); ClassDB::add_compatibility_class("SpatialVelocityTracker", "VelocityTracker3D"); ClassDB::add_compatibility_class("SphereShape", "SphereShape3D"); diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp index 8e45b22cbf..a33f850755 100644 --- a/scene/resources/world_3d.cpp +++ b/scene/resources/world_3d.cpp @@ -348,7 +348,7 @@ void World3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "camera_effects", PROPERTY_HINT_RESOURCE_TYPE, "CameraEffects"), "set_camera_effects", "get_camera_effects"); ADD_PROPERTY(PropertyInfo(Variant::_RID, "space", PROPERTY_HINT_NONE, "", 0), "", "get_space"); ADD_PROPERTY(PropertyInfo(Variant::_RID, "scenario", PROPERTY_HINT_NONE, "", 0), "", "get_scenario"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectSpaceState", 0), "", "get_direct_space_state"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectSpaceState3D", 0), "", "get_direct_space_state"); } World3D::World3D() { diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index af914e5ba9..d7384bae74 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -39,7 +39,7 @@ #include "core/rid.h" #include "scene/2d/navigation_region_2d.h" -// This server exposes the 3D `NavigationServer` features in the 2D world. +// This server exposes the `NavigationServer3D` features in the 2D world. class NavigationServer2D : public Object { GDCLASS(NavigationServer2D, Object); diff --git a/servers/physics_3d/physics_server_3d_sw.cpp b/servers/physics_3d/physics_server_3d_sw.cpp index da84630088..11a3b7bbb8 100644 --- a/servers/physics_3d/physics_server_3d_sw.cpp +++ b/servers/physics_3d/physics_server_3d_sw.cpp @@ -70,7 +70,7 @@ RID PhysicsServer3DSW::shape_create(ShapeType p_shape) { } break; case SHAPE_CYLINDER: { - ERR_FAIL_V_MSG(RID(), "CylinderShape is not supported in GodotPhysics. Please switch to Bullet in the Project Settings."); + ERR_FAIL_V_MSG(RID(), "CylinderShape3D is not supported in GodotPhysics. Please switch to Bullet in the Project Settings."); } break; case SHAPE_CONVEX_POLYGON: { diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index c53ffcc7b5..f96752813d 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -194,10 +194,10 @@ void register_server_singletons() { Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingServer", RenderingServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("AudioServer", AudioServer::get_singleton())); - Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer3D", PhysicsServer3D::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer2D", PhysicsServer2D::get_singleton())); - Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer", NavigationServer3D::get_singleton_mut())); + Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer3D", PhysicsServer3D::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer2D", NavigationServer2D::get_singleton_mut())); + Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer3D", NavigationServer3D::get_singleton_mut())); Engine::get_singleton()->add_singleton(Engine::Singleton("ARVRServer", ARVRServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("CameraServer", CameraServer::get_singleton())); } -- cgit v1.2.3