| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="PhysicsServer2DExtension" inherits="PhysicsServer2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Provides virtual methods that can be overridden to create custom [PhysicsServer2D] implementations. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This class extends [PhysicsServer2D] by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. |
| 8 | Intended for use with GDExtension to create custom implementations of [PhysicsServer2D]. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="_area_add_shape" qualifiers="virtual required"> |
| 14 | <return type="void" /> |
| 15 | <param index="0" name="area" type="RID" /> |
| 16 | <param index="1" name="shape" type="RID" /> |
| 17 | <param index="2" name="transform" type="Transform2D" /> |
| 18 | <param index="3" name="disabled" type="bool" /> |
| 19 | <description> |
| 20 | Overridable version of [method PhysicsServer2D.area_add_shape]. |
| 21 | </description> |
| 22 | </method> |
| 23 | <method name="_area_attach_canvas_instance_id" qualifiers="virtual required"> |
| 24 | <return type="void" /> |
| 25 | <param index="0" name="area" type="RID" /> |
| 26 | <param index="1" name="id" type="int" /> |
| 27 | <description> |
| 28 | Overridable version of [method PhysicsServer2D.area_attach_canvas_instance_id]. |
| 29 | </description> |
| 30 | </method> |
| 31 | <method name="_area_attach_object_instance_id" qualifiers="virtual required"> |
| 32 | <return type="void" /> |
| 33 | <param index="0" name="area" type="RID" /> |
| 34 | <param index="1" name="id" type="int" /> |
| 35 | <description> |
| 36 | Overridable version of [method PhysicsServer2D.area_attach_object_instance_id]. |
| 37 | </description> |
| 38 | </method> |
| 39 | <method name="_area_clear_shapes" qualifiers="virtual required"> |
| 40 | <return type="void" /> |
| 41 | <param index="0" name="area" type="RID" /> |
| 42 | <description> |
| 43 | Overridable version of [method PhysicsServer2D.area_clear_shapes]. |
| 44 | </description> |
| 45 | </method> |
| 46 | <method name="_area_create" qualifiers="virtual required"> |
| 47 | <return type="RID" /> |
| 48 | <description> |
| 49 | Overridable version of [method PhysicsServer2D.area_create]. |
| 50 | </description> |
| 51 | </method> |
| 52 | <method name="_area_get_canvas_instance_id" qualifiers="virtual required const"> |
| 53 | <return type="int" /> |
| 54 | <param index="0" name="area" type="RID" /> |
| 55 | <description> |
| 56 | Overridable version of [method PhysicsServer2D.area_get_canvas_instance_id]. |
| 57 | </description> |
| 58 | </method> |
| 59 | <method name="_area_get_collision_layer" qualifiers="virtual required const"> |
| 60 | <return type="int" /> |
| 61 | <param index="0" name="area" type="RID" /> |
| 62 | <description> |
| 63 | Overridable version of [method PhysicsServer2D.area_get_collision_layer]. |
| 64 | </description> |
| 65 | </method> |
| 66 | <method name="_area_get_collision_mask" qualifiers="virtual required const"> |
| 67 | <return type="int" /> |
| 68 | <param index="0" name="area" type="RID" /> |
| 69 | <description> |
| 70 | Overridable version of [method PhysicsServer2D.area_get_collision_mask]. |
| 71 | </description> |
| 72 | </method> |
| 73 | <method name="_area_get_object_instance_id" qualifiers="virtual required const"> |
| 74 | <return type="int" /> |
| 75 | <param index="0" name="area" type="RID" /> |
| 76 | <description> |
| 77 | Overridable version of [method PhysicsServer2D.area_get_object_instance_id]. |
| 78 | </description> |
| 79 | </method> |
| 80 | <method name="_area_get_param" qualifiers="virtual required const"> |
| 81 | <return type="Variant" /> |
| 82 | <param index="0" name="area" type="RID" /> |
| 83 | <param index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" /> |
| 84 | <description> |
| 85 | Overridable version of [method PhysicsServer2D.area_get_param]. |
| 86 | </description> |
| 87 | </method> |
| 88 | <method name="_area_get_shape" qualifiers="virtual required const"> |
| 89 | <return type="RID" /> |
| 90 | <param index="0" name="area" type="RID" /> |
| 91 | <param index="1" name="shape_idx" type="int" /> |
| 92 | <description> |
| 93 | Overridable version of [method PhysicsServer2D.area_get_shape]. |
| 94 | </description> |
| 95 | </method> |
| 96 | <method name="_area_get_shape_count" qualifiers="virtual required const"> |
| 97 | <return type="int" /> |
| 98 | <param index="0" name="area" type="RID" /> |
| 99 | <description> |
| 100 | Overridable version of [method PhysicsServer2D.area_get_shape_count]. |
| 101 | </description> |
| 102 | </method> |
| 103 | <method name="_area_get_shape_transform" qualifiers="virtual required const"> |
| 104 | <return type="Transform2D" /> |
| 105 | <param index="0" name="area" type="RID" /> |
| 106 | <param index="1" name="shape_idx" type="int" /> |
| 107 | <description> |
| 108 | Overridable version of [method PhysicsServer2D.area_get_shape_transform]. |
| 109 | </description> |
| 110 | </method> |
| 111 | <method name="_area_get_space" qualifiers="virtual required const"> |
| 112 | <return type="RID" /> |
| 113 | <param index="0" name="area" type="RID" /> |
| 114 | <description> |
| 115 | Overridable version of [method PhysicsServer2D.area_get_space]. |
| 116 | </description> |
| 117 | </method> |
| 118 | <method name="_area_get_transform" qualifiers="virtual required const"> |
| 119 | <return type="Transform2D" /> |
| 120 | <param index="0" name="area" type="RID" /> |
| 121 | <description> |
| 122 | Overridable version of [method PhysicsServer2D.area_get_transform]. |
| 123 | </description> |
| 124 | </method> |
| 125 | <method name="_area_remove_shape" qualifiers="virtual required"> |
| 126 | <return type="void" /> |
| 127 | <param index="0" name="area" type="RID" /> |
| 128 | <param index="1" name="shape_idx" type="int" /> |
| 129 | <description> |
| 130 | Overridable version of [method PhysicsServer2D.area_remove_shape]. |
| 131 | </description> |
| 132 | </method> |
| 133 | <method name="_area_set_area_monitor_callback" qualifiers="virtual required"> |
| 134 | <return type="void" /> |
| 135 | <param index="0" name="area" type="RID" /> |
| 136 | <param index="1" name="callback" type="Callable" /> |
| 137 | <description> |
| 138 | Overridable version of [method PhysicsServer2D.area_set_area_monitor_callback]. |
| 139 | </description> |
| 140 | </method> |
| 141 | <method name="_area_set_collision_layer" qualifiers="virtual required"> |
| 142 | <return type="void" /> |
| 143 | <param index="0" name="area" type="RID" /> |
| 144 | <param index="1" name="layer" type="int" /> |
| 145 | <description> |
| 146 | Overridable version of [method PhysicsServer2D.area_set_collision_layer]. |
| 147 | </description> |
| 148 | </method> |
| 149 | <method name="_area_set_collision_mask" qualifiers="virtual required"> |
| 150 | <return type="void" /> |
| 151 | <param index="0" name="area" type="RID" /> |
| 152 | <param index="1" name="mask" type="int" /> |
| 153 | <description> |
| 154 | Overridable version of [method PhysicsServer2D.area_set_collision_mask]. |
| 155 | </description> |
| 156 | </method> |
| 157 | <method name="_area_set_monitor_callback" qualifiers="virtual required"> |
| 158 | <return type="void" /> |
| 159 | <param index="0" name="area" type="RID" /> |
| 160 | <param index="1" name="callback" type="Callable" /> |
| 161 | <description> |
| 162 | Overridable version of [method PhysicsServer2D.area_set_monitor_callback]. |
| 163 | </description> |
| 164 | </method> |
| 165 | <method name="_area_set_monitorable" qualifiers="virtual required"> |
| 166 | <return type="void" /> |
| 167 | <param index="0" name="area" type="RID" /> |
| 168 | <param index="1" name="monitorable" type="bool" /> |
| 169 | <description> |
| 170 | Overridable version of [method PhysicsServer2D.area_set_monitorable]. |
| 171 | </description> |
| 172 | </method> |
| 173 | <method name="_area_set_param" qualifiers="virtual required"> |
| 174 | <return type="void" /> |
| 175 | <param index="0" name="area" type="RID" /> |
| 176 | <param index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" /> |
| 177 | <param index="2" name="value" type="Variant" /> |
| 178 | <description> |
| 179 | Overridable version of [method PhysicsServer2D.area_set_param]. |
| 180 | </description> |
| 181 | </method> |
| 182 | <method name="_area_set_pickable" qualifiers="virtual required"> |
| 183 | <return type="void" /> |
| 184 | <param index="0" name="area" type="RID" /> |
| 185 | <param index="1" name="pickable" type="bool" /> |
| 186 | <description> |
| 187 | If set to [code]true[/code], allows the area with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it. |
| 188 | Overridable version of [PhysicsServer2D]'s internal [code]area_set_pickable[/code] method. Corresponds to [member CollisionObject2D.input_pickable]. |
| 189 | </description> |
| 190 | </method> |
| 191 | <method name="_area_set_shape" qualifiers="virtual required"> |
| 192 | <return type="void" /> |
| 193 | <param index="0" name="area" type="RID" /> |
| 194 | <param index="1" name="shape_idx" type="int" /> |
| 195 | <param index="2" name="shape" type="RID" /> |
| 196 | <description> |
| 197 | Overridable version of [method PhysicsServer2D.area_set_shape]. |
| 198 | </description> |
| 199 | </method> |
| 200 | <method name="_area_set_shape_disabled" qualifiers="virtual required"> |
| 201 | <return type="void" /> |
| 202 | <param index="0" name="area" type="RID" /> |
| 203 | <param index="1" name="shape_idx" type="int" /> |
| 204 | <param index="2" name="disabled" type="bool" /> |
| 205 | <description> |
| 206 | Overridable version of [method PhysicsServer2D.area_set_shape_disabled]. |
| 207 | </description> |
| 208 | </method> |
| 209 | <method name="_area_set_shape_transform" qualifiers="virtual required"> |
| 210 | <return type="void" /> |
| 211 | <param index="0" name="area" type="RID" /> |
| 212 | <param index="1" name="shape_idx" type="int" /> |
| 213 | <param index="2" name="transform" type="Transform2D" /> |
| 214 | <description> |
| 215 | Overridable version of [method PhysicsServer2D.area_set_shape_transform]. |
| 216 | </description> |
| 217 | </method> |
| 218 | <method name="_area_set_space" qualifiers="virtual required"> |
| 219 | <return type="void" /> |
| 220 | <param index="0" name="area" type="RID" /> |
| 221 | <param index="1" name="space" type="RID" /> |
| 222 | <description> |
| 223 | Overridable version of [method PhysicsServer2D.area_set_space]. |
| 224 | </description> |
| 225 | </method> |
| 226 | <method name="_area_set_transform" qualifiers="virtual required"> |
| 227 | <return type="void" /> |
| 228 | <param index="0" name="area" type="RID" /> |
| 229 | <param index="1" name="transform" type="Transform2D" /> |
| 230 | <description> |
| 231 | Overridable version of [method PhysicsServer2D.area_set_transform]. |
| 232 | </description> |
| 233 | </method> |
| 234 | <method name="_body_add_collision_exception" qualifiers="virtual required"> |
| 235 | <return type="void" /> |
| 236 | <param index="0" name="body" type="RID" /> |
| 237 | <param index="1" name="excepted_body" type="RID" /> |
| 238 | <description> |
| 239 | Overridable version of [method PhysicsServer2D.body_add_collision_exception]. |
| 240 | </description> |
| 241 | </method> |
| 242 | <method name="_body_add_constant_central_force" qualifiers="virtual required"> |
| 243 | <return type="void" /> |
| 244 | <param index="0" name="body" type="RID" /> |
| 245 | <param index="1" name="force" type="Vector2" /> |
| 246 | <description> |
| 247 | Overridable version of [method PhysicsServer2D.body_add_constant_central_force]. |
| 248 | </description> |
| 249 | </method> |
| 250 | <method name="_body_add_constant_force" qualifiers="virtual required"> |
| 251 | <return type="void" /> |
| 252 | <param index="0" name="body" type="RID" /> |
| 253 | <param index="1" name="force" type="Vector2" /> |
| 254 | <param index="2" name="position" type="Vector2" /> |
| 255 | <description> |
| 256 | Overridable version of [method PhysicsServer2D.body_add_constant_force]. |
| 257 | </description> |
| 258 | </method> |
| 259 | <method name="_body_add_constant_torque" qualifiers="virtual required"> |
| 260 | <return type="void" /> |
| 261 | <param index="0" name="body" type="RID" /> |
| 262 | <param index="1" name="torque" type="float" /> |
| 263 | <description> |
| 264 | Overridable version of [method PhysicsServer2D.body_add_constant_torque]. |
| 265 | </description> |
| 266 | </method> |
| 267 | <method name="_body_add_shape" qualifiers="virtual required"> |
| 268 | <return type="void" /> |
| 269 | <param index="0" name="body" type="RID" /> |
| 270 | <param index="1" name="shape" type="RID" /> |
| 271 | <param index="2" name="transform" type="Transform2D" /> |
| 272 | <param index="3" name="disabled" type="bool" /> |
| 273 | <description> |
| 274 | Overridable version of [method PhysicsServer2D.body_add_shape]. |
| 275 | </description> |
| 276 | </method> |
| 277 | <method name="_body_apply_central_force" qualifiers="virtual required"> |
| 278 | <return type="void" /> |
| 279 | <param index="0" name="body" type="RID" /> |
| 280 | <param index="1" name="force" type="Vector2" /> |
| 281 | <description> |
| 282 | Overridable version of [method PhysicsServer2D.body_apply_central_force]. |
| 283 | </description> |
| 284 | </method> |
| 285 | <method name="_body_apply_central_impulse" qualifiers="virtual required"> |
| 286 | <return type="void" /> |
| 287 | <param index="0" name="body" type="RID" /> |
| 288 | <param index="1" name="impulse" type="Vector2" /> |
| 289 | <description> |
| 290 | Overridable version of [method PhysicsServer2D.body_apply_central_impulse]. |
| 291 | </description> |
| 292 | </method> |
| 293 | <method name="_body_apply_force" qualifiers="virtual required"> |
| 294 | <return type="void" /> |
| 295 | <param index="0" name="body" type="RID" /> |
| 296 | <param index="1" name="force" type="Vector2" /> |
| 297 | <param index="2" name="position" type="Vector2" /> |
| 298 | <description> |
| 299 | Overridable version of [method PhysicsServer2D.body_apply_force]. |
| 300 | </description> |
| 301 | </method> |
| 302 | <method name="_body_apply_impulse" qualifiers="virtual required"> |
| 303 | <return type="void" /> |
| 304 | <param index="0" name="body" type="RID" /> |
| 305 | <param index="1" name="impulse" type="Vector2" /> |
| 306 | <param index="2" name="position" type="Vector2" /> |
| 307 | <description> |
| 308 | Overridable version of [method PhysicsServer2D.body_apply_impulse]. |
| 309 | </description> |
| 310 | </method> |
| 311 | <method name="_body_apply_torque" qualifiers="virtual required"> |
| 312 | <return type="void" /> |
| 313 | <param index="0" name="body" type="RID" /> |
| 314 | <param index="1" name="torque" type="float" /> |
| 315 | <description> |
| 316 | Overridable version of [method PhysicsServer2D.body_apply_torque]. |
| 317 | </description> |
| 318 | </method> |
| 319 | <method name="_body_apply_torque_impulse" qualifiers="virtual required"> |
| 320 | <return type="void" /> |
| 321 | <param index="0" name="body" type="RID" /> |
| 322 | <param index="1" name="impulse" type="float" /> |
| 323 | <description> |
| 324 | Overridable version of [method PhysicsServer2D.body_apply_torque_impulse]. |
| 325 | </description> |
| 326 | </method> |
| 327 | <method name="_body_attach_canvas_instance_id" qualifiers="virtual required"> |
| 328 | <return type="void" /> |
| 329 | <param index="0" name="body" type="RID" /> |
| 330 | <param index="1" name="id" type="int" /> |
| 331 | <description> |
| 332 | Overridable version of [method PhysicsServer2D.body_attach_canvas_instance_id]. |
| 333 | </description> |
| 334 | </method> |
| 335 | <method name="_body_attach_object_instance_id" qualifiers="virtual required"> |
| 336 | <return type="void" /> |
| 337 | <param index="0" name="body" type="RID" /> |
| 338 | <param index="1" name="id" type="int" /> |
| 339 | <description> |
| 340 | Overridable version of [method PhysicsServer2D.body_attach_object_instance_id]. |
| 341 | </description> |
| 342 | </method> |
| 343 | <method name="_body_clear_shapes" qualifiers="virtual required"> |
| 344 | <return type="void" /> |
| 345 | <param index="0" name="body" type="RID" /> |
| 346 | <description> |
| 347 | Overridable version of [method PhysicsServer2D.body_clear_shapes]. |
| 348 | </description> |
| 349 | </method> |
| 350 | <method name="_body_collide_shape" qualifiers="virtual required"> |
| 351 | <return type="bool" /> |
| 352 | <param index="0" name="body" type="RID" /> |
| 353 | <param index="1" name="body_shape" type="int" /> |
| 354 | <param index="2" name="shape" type="RID" /> |
| 355 | <param index="3" name="shape_xform" type="Transform2D" /> |
| 356 | <param index="4" name="motion" type="Vector2" /> |
| 357 | <param index="5" name="results" type="void*" /> |
| 358 | <param index="6" name="result_max" type="int" /> |
| 359 | <param index="7" name="result_count" type="int32_t*" /> |
| 360 | <description> |
| 361 | Given a [param body], a [param shape], and their respective parameters, this method should return [code]true[/code] if a collision between the two would occur, with additional details passed in [param results]. |
| 362 | Overridable version of [PhysicsServer2D]'s internal [code]shape_collide[/code] method. Corresponds to [method PhysicsDirectSpaceState2D.collide_shape]. |
| 363 | </description> |
| 364 | </method> |
| 365 | <method name="_body_create" qualifiers="virtual required"> |
| 366 | <return type="RID" /> |
| 367 | <description> |
| 368 | Overridable version of [method PhysicsServer2D.body_create]. |
| 369 | </description> |
| 370 | </method> |
| 371 | <method name="_body_get_canvas_instance_id" qualifiers="virtual required const"> |
| 372 | <return type="int" /> |
| 373 | <param index="0" name="body" type="RID" /> |
| 374 | <description> |
| 375 | Overridable version of [method PhysicsServer2D.body_get_canvas_instance_id]. |
| 376 | </description> |
| 377 | </method> |
| 378 | <method name="_body_get_collision_exceptions" qualifiers="virtual required const"> |
| 379 | <return type="RID[]" /> |
| 380 | <param index="0" name="body" type="RID" /> |
| 381 | <description> |
| 382 | Returns the [RID]s of all bodies added as collision exceptions for the given [param body]. See also [method _body_add_collision_exception] and [method _body_remove_collision_exception]. |
| 383 | Overridable version of [PhysicsServer2D]'s internal [code]body_get_collision_exceptions[/code] method. Corresponds to [method PhysicsBody2D.get_collision_exceptions]. |
| 384 | </description> |
| 385 | </method> |
| 386 | <method name="_body_get_collision_layer" qualifiers="virtual required const"> |
| 387 | <return type="int" /> |
| 388 | <param index="0" name="body" type="RID" /> |
| 389 | <description> |
| 390 | Overridable version of [method PhysicsServer2D.body_get_collision_layer]. |
| 391 | </description> |
| 392 | </method> |
| 393 | <method name="_body_get_collision_mask" qualifiers="virtual required const"> |
| 394 | <return type="int" /> |
| 395 | <param index="0" name="body" type="RID" /> |
| 396 | <description> |
| 397 | Overridable version of [method PhysicsServer2D.body_get_collision_mask]. |
| 398 | </description> |
| 399 | </method> |
| 400 | <method name="_body_get_collision_priority" qualifiers="virtual required const"> |
| 401 | <return type="float" /> |
| 402 | <param index="0" name="body" type="RID" /> |
| 403 | <description> |
| 404 | Overridable version of [method PhysicsServer2D.body_get_collision_priority]. |
| 405 | </description> |
| 406 | </method> |
| 407 | <method name="_body_get_constant_force" qualifiers="virtual required const"> |
| 408 | <return type="Vector2" /> |
| 409 | <param index="0" name="body" type="RID" /> |
| 410 | <description> |
| 411 | Overridable version of [method PhysicsServer2D.body_get_constant_force]. |
| 412 | </description> |
| 413 | </method> |
| 414 | <method name="_body_get_constant_torque" qualifiers="virtual required const"> |
| 415 | <return type="float" /> |
| 416 | <param index="0" name="body" type="RID" /> |
| 417 | <description> |
| 418 | Overridable version of [method PhysicsServer2D.body_get_constant_torque]. |
| 419 | </description> |
| 420 | </method> |
| 421 | <method name="_body_get_contacts_reported_depth_threshold" qualifiers="virtual required const"> |
| 422 | <return type="float" /> |
| 423 | <param index="0" name="body" type="RID" /> |
| 424 | <description> |
| 425 | Overridable version of [PhysicsServer2D]'s internal [code]body_get_contacts_reported_depth_threshold[/code] method. |
| 426 | [b]Note:[/b] This method is currently unused by Godot's default physics implementation. |
| 427 | </description> |
| 428 | </method> |
| 429 | <method name="_body_get_continuous_collision_detection_mode" qualifiers="virtual required const"> |
| 430 | <return type="int" enum="PhysicsServer2D.CCDMode" /> |
| 431 | <param index="0" name="body" type="RID" /> |
| 432 | <description> |
| 433 | Overridable version of [method PhysicsServer2D.body_get_continuous_collision_detection_mode]. |
| 434 | </description> |
| 435 | </method> |
| 436 | <method name="_body_get_direct_state" qualifiers="virtual required"> |
| 437 | <return type="PhysicsDirectBodyState2D" /> |
| 438 | <param index="0" name="body" type="RID" /> |
| 439 | <description> |
| 440 | Overridable version of [method PhysicsServer2D.body_get_direct_state]. |
| 441 | </description> |
| 442 | </method> |
| 443 | <method name="_body_get_max_contacts_reported" qualifiers="virtual required const"> |
| 444 | <return type="int" /> |
| 445 | <param index="0" name="body" type="RID" /> |
| 446 | <description> |
| 447 | Overridable version of [method PhysicsServer2D.body_get_max_contacts_reported]. |
| 448 | </description> |
| 449 | </method> |
| 450 | <method name="_body_get_mode" qualifiers="virtual required const"> |
| 451 | <return type="int" enum="PhysicsServer2D.BodyMode" /> |
| 452 | <param index="0" name="body" type="RID" /> |
| 453 | <description> |
| 454 | Overridable version of [method PhysicsServer2D.body_get_mode]. |
| 455 | </description> |
| 456 | </method> |
| 457 | <method name="_body_get_object_instance_id" qualifiers="virtual required const"> |
| 458 | <return type="int" /> |
| 459 | <param index="0" name="body" type="RID" /> |
| 460 | <description> |
| 461 | Overridable version of [method PhysicsServer2D.body_get_object_instance_id]. |
| 462 | </description> |
| 463 | </method> |
| 464 | <method name="_body_get_param" qualifiers="virtual required const"> |
| 465 | <return type="Variant" /> |
| 466 | <param index="0" name="body" type="RID" /> |
| 467 | <param index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" /> |
| 468 | <description> |
| 469 | Overridable version of [method PhysicsServer2D.body_get_param]. |
| 470 | </description> |
| 471 | </method> |
| 472 | <method name="_body_get_shape" qualifiers="virtual required const"> |
| 473 | <return type="RID" /> |
| 474 | <param index="0" name="body" type="RID" /> |
| 475 | <param index="1" name="shape_idx" type="int" /> |
| 476 | <description> |
| 477 | Overridable version of [method PhysicsServer2D.body_get_shape]. |
| 478 | </description> |
| 479 | </method> |
| 480 | <method name="_body_get_shape_count" qualifiers="virtual required const"> |
| 481 | <return type="int" /> |
| 482 | <param index="0" name="body" type="RID" /> |
| 483 | <description> |
| 484 | Overridable version of [method PhysicsServer2D.body_get_shape_count]. |
| 485 | </description> |
| 486 | </method> |
| 487 | <method name="_body_get_shape_transform" qualifiers="virtual required const"> |
| 488 | <return type="Transform2D" /> |
| 489 | <param index="0" name="body" type="RID" /> |
| 490 | <param index="1" name="shape_idx" type="int" /> |
| 491 | <description> |
| 492 | Overridable version of [method PhysicsServer2D.body_get_shape_transform]. |
| 493 | </description> |
| 494 | </method> |
| 495 | <method name="_body_get_space" qualifiers="virtual required const"> |
| 496 | <return type="RID" /> |
| 497 | <param index="0" name="body" type="RID" /> |
| 498 | <description> |
| 499 | Overridable version of [method PhysicsServer2D.body_get_space]. |
| 500 | </description> |
| 501 | </method> |
| 502 | <method name="_body_get_state" qualifiers="virtual required const"> |
| 503 | <return type="Variant" /> |
| 504 | <param index="0" name="body" type="RID" /> |
| 505 | <param index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" /> |
| 506 | <description> |
| 507 | Overridable version of [method PhysicsServer2D.body_get_state]. |
| 508 | </description> |
| 509 | </method> |
| 510 | <method name="_body_is_omitting_force_integration" qualifiers="virtual required const"> |
| 511 | <return type="bool" /> |
| 512 | <param index="0" name="body" type="RID" /> |
| 513 | <description> |
| 514 | Overridable version of [method PhysicsServer2D.body_is_omitting_force_integration]. |
| 515 | </description> |
| 516 | </method> |
| 517 | <method name="_body_remove_collision_exception" qualifiers="virtual required"> |
| 518 | <return type="void" /> |
| 519 | <param index="0" name="body" type="RID" /> |
| 520 | <param index="1" name="excepted_body" type="RID" /> |
| 521 | <description> |
| 522 | Overridable version of [method PhysicsServer2D.body_remove_collision_exception]. |
| 523 | </description> |
| 524 | </method> |
| 525 | <method name="_body_remove_shape" qualifiers="virtual required"> |
| 526 | <return type="void" /> |
| 527 | <param index="0" name="body" type="RID" /> |
| 528 | <param index="1" name="shape_idx" type="int" /> |
| 529 | <description> |
| 530 | Overridable version of [method PhysicsServer2D.body_remove_shape]. |
| 531 | </description> |
| 532 | </method> |
| 533 | <method name="_body_reset_mass_properties" qualifiers="virtual required"> |
| 534 | <return type="void" /> |
| 535 | <param index="0" name="body" type="RID" /> |
| 536 | <description> |
| 537 | Overridable version of [method PhysicsServer2D.body_reset_mass_properties]. |
| 538 | </description> |
| 539 | </method> |
| 540 | <method name="_body_set_axis_velocity" qualifiers="virtual required"> |
| 541 | <return type="void" /> |
| 542 | <param index="0" name="body" type="RID" /> |
| 543 | <param index="1" name="axis_velocity" type="Vector2" /> |
| 544 | <description> |
| 545 | Overridable version of [method PhysicsServer2D.body_set_axis_velocity]. |
| 546 | </description> |
| 547 | </method> |
| 548 | <method name="_body_set_collision_layer" qualifiers="virtual required"> |
| 549 | <return type="void" /> |
| 550 | <param index="0" name="body" type="RID" /> |
| 551 | <param index="1" name="layer" type="int" /> |
| 552 | <description> |
| 553 | Overridable version of [method PhysicsServer2D.body_set_collision_layer]. |
| 554 | </description> |
| 555 | </method> |
| 556 | <method name="_body_set_collision_mask" qualifiers="virtual required"> |
| 557 | <return type="void" /> |
| 558 | <param index="0" name="body" type="RID" /> |
| 559 | <param index="1" name="mask" type="int" /> |
| 560 | <description> |
| 561 | Overridable version of [method PhysicsServer2D.body_set_collision_mask]. |
| 562 | </description> |
| 563 | </method> |
| 564 | <method name="_body_set_collision_priority" qualifiers="virtual required"> |
| 565 | <return type="void" /> |
| 566 | <param index="0" name="body" type="RID" /> |
| 567 | <param index="1" name="priority" type="float" /> |
| 568 | <description> |
| 569 | Overridable version of [method PhysicsServer2D.body_set_collision_priority]. |
| 570 | </description> |
| 571 | </method> |
| 572 | <method name="_body_set_constant_force" qualifiers="virtual required"> |
| 573 | <return type="void" /> |
| 574 | <param index="0" name="body" type="RID" /> |
| 575 | <param index="1" name="force" type="Vector2" /> |
| 576 | <description> |
| 577 | Overridable version of [method PhysicsServer2D.body_set_constant_force]. |
| 578 | </description> |
| 579 | </method> |
| 580 | <method name="_body_set_constant_torque" qualifiers="virtual required"> |
| 581 | <return type="void" /> |
| 582 | <param index="0" name="body" type="RID" /> |
| 583 | <param index="1" name="torque" type="float" /> |
| 584 | <description> |
| 585 | Overridable version of [method PhysicsServer2D.body_set_constant_torque]. |
| 586 | </description> |
| 587 | </method> |
| 588 | <method name="_body_set_contacts_reported_depth_threshold" qualifiers="virtual required"> |
| 589 | <return type="void" /> |
| 590 | <param index="0" name="body" type="RID" /> |
| 591 | <param index="1" name="threshold" type="float" /> |
| 592 | <description> |
| 593 | Overridable version of [PhysicsServer2D]'s internal [code]body_set_contacts_reported_depth_threshold[/code] method. |
| 594 | [b]Note:[/b] This method is currently unused by Godot's default physics implementation. |
| 595 | </description> |
| 596 | </method> |
| 597 | <method name="_body_set_continuous_collision_detection_mode" qualifiers="virtual required"> |
| 598 | <return type="void" /> |
| 599 | <param index="0" name="body" type="RID" /> |
| 600 | <param index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode" /> |
| 601 | <description> |
| 602 | Overridable version of [method PhysicsServer2D.body_set_continuous_collision_detection_mode]. |
| 603 | </description> |
| 604 | </method> |
| 605 | <method name="_body_set_force_integration_callback" qualifiers="virtual required"> |
| 606 | <return type="void" /> |
| 607 | <param index="0" name="body" type="RID" /> |
| 608 | <param index="1" name="callable" type="Callable" /> |
| 609 | <param index="2" name="userdata" type="Variant" /> |
| 610 | <description> |
| 611 | Overridable version of [method PhysicsServer2D.body_set_force_integration_callback]. |
| 612 | </description> |
| 613 | </method> |
| 614 | <method name="_body_set_max_contacts_reported" qualifiers="virtual required"> |
| 615 | <return type="void" /> |
| 616 | <param index="0" name="body" type="RID" /> |
| 617 | <param index="1" name="amount" type="int" /> |
| 618 | <description> |
| 619 | Overridable version of [method PhysicsServer2D.body_set_max_contacts_reported]. |
| 620 | </description> |
| 621 | </method> |
| 622 | <method name="_body_set_mode" qualifiers="virtual required"> |
| 623 | <return type="void" /> |
| 624 | <param index="0" name="body" type="RID" /> |
| 625 | <param index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode" /> |
| 626 | <description> |
| 627 | Overridable version of [method PhysicsServer2D.body_set_mode]. |
| 628 | </description> |
| 629 | </method> |
| 630 | <method name="_body_set_omit_force_integration" qualifiers="virtual required"> |
| 631 | <return type="void" /> |
| 632 | <param index="0" name="body" type="RID" /> |
| 633 | <param index="1" name="enable" type="bool" /> |
| 634 | <description> |
| 635 | Overridable version of [method PhysicsServer2D.body_set_omit_force_integration]. |
| 636 | </description> |
| 637 | </method> |
| 638 | <method name="_body_set_param" qualifiers="virtual required"> |
| 639 | <return type="void" /> |
| 640 | <param index="0" name="body" type="RID" /> |
| 641 | <param index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" /> |
| 642 | <param index="2" name="value" type="Variant" /> |
| 643 | <description> |
| 644 | Overridable version of [method PhysicsServer2D.body_set_param]. |
| 645 | </description> |
| 646 | </method> |
| 647 | <method name="_body_set_pickable" qualifiers="virtual required"> |
| 648 | <return type="void" /> |
| 649 | <param index="0" name="body" type="RID" /> |
| 650 | <param index="1" name="pickable" type="bool" /> |
| 651 | <description> |
| 652 | If set to [code]true[/code], allows the body with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it. |
| 653 | Overridable version of [PhysicsServer2D]'s internal [code]body_set_pickable[/code] method. Corresponds to [member CollisionObject2D.input_pickable]. |
| 654 | </description> |
| 655 | </method> |
| 656 | <method name="_body_set_shape" qualifiers="virtual required"> |
| 657 | <return type="void" /> |
| 658 | <param index="0" name="body" type="RID" /> |
| 659 | <param index="1" name="shape_idx" type="int" /> |
| 660 | <param index="2" name="shape" type="RID" /> |
| 661 | <description> |
| 662 | Overridable version of [method PhysicsServer2D.body_set_shape]. |
| 663 | </description> |
| 664 | </method> |
| 665 | <method name="_body_set_shape_as_one_way_collision" qualifiers="virtual required"> |
| 666 | <return type="void" /> |
| 667 | <param index="0" name="body" type="RID" /> |
| 668 | <param index="1" name="shape_idx" type="int" /> |
| 669 | <param index="2" name="enable" type="bool" /> |
| 670 | <param index="3" name="margin" type="float" /> |
| 671 | <description> |
| 672 | Overridable version of [method PhysicsServer2D.body_set_shape_as_one_way_collision]. |
| 673 | </description> |
| 674 | </method> |
| 675 | <method name="_body_set_shape_disabled" qualifiers="virtual required"> |
| 676 | <return type="void" /> |
| 677 | <param index="0" name="body" type="RID" /> |
| 678 | <param index="1" name="shape_idx" type="int" /> |
| 679 | <param index="2" name="disabled" type="bool" /> |
| 680 | <description> |
| 681 | Overridable version of [method PhysicsServer2D.body_set_shape_disabled]. |
| 682 | </description> |
| 683 | </method> |
| 684 | <method name="_body_set_shape_transform" qualifiers="virtual required"> |
| 685 | <return type="void" /> |
| 686 | <param index="0" name="body" type="RID" /> |
| 687 | <param index="1" name="shape_idx" type="int" /> |
| 688 | <param index="2" name="transform" type="Transform2D" /> |
| 689 | <description> |
| 690 | Overridable version of [method PhysicsServer2D.body_set_shape_transform]. |
| 691 | </description> |
| 692 | </method> |
| 693 | <method name="_body_set_space" qualifiers="virtual required"> |
| 694 | <return type="void" /> |
| 695 | <param index="0" name="body" type="RID" /> |
| 696 | <param index="1" name="space" type="RID" /> |
| 697 | <description> |
| 698 | Overridable version of [method PhysicsServer2D.body_set_space]. |
| 699 | </description> |
| 700 | </method> |
| 701 | <method name="_body_set_state" qualifiers="virtual required"> |
| 702 | <return type="void" /> |
| 703 | <param index="0" name="body" type="RID" /> |
| 704 | <param index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" /> |
| 705 | <param index="2" name="value" type="Variant" /> |
| 706 | <description> |
| 707 | Overridable version of [method PhysicsServer2D.body_set_state]. |
| 708 | </description> |
| 709 | </method> |
| 710 | <method name="_body_set_state_sync_callback" qualifiers="virtual required"> |
| 711 | <return type="void" /> |
| 712 | <param index="0" name="body" type="RID" /> |
| 713 | <param index="1" name="callable" type="Callable" /> |
| 714 | <description> |
| 715 | Assigns the [param body] to call the given [param callable] during the synchronization phase of the loop, before [method _step] is called. See also [method _sync]. |
| 716 | Overridable version of [method PhysicsServer2D.body_set_state_sync_callback]. |
| 717 | </description> |
| 718 | </method> |
| 719 | <method name="_body_test_motion" qualifiers="virtual required const"> |
| 720 | <return type="bool" /> |
| 721 | <param index="0" name="body" type="RID" /> |
| 722 | <param index="1" name="from" type="Transform2D" /> |
| 723 | <param index="2" name="motion" type="Vector2" /> |
| 724 | <param index="3" name="margin" type="float" /> |
| 725 | <param index="4" name="collide_separation_ray" type="bool" /> |
| 726 | <param index="5" name="recovery_as_collision" type="bool" /> |
| 727 | <param index="6" name="result" type="PhysicsServer2DExtensionMotionResult*" /> |
| 728 | <description> |
| 729 | Overridable version of [method PhysicsServer2D.body_test_motion]. Unlike the exposed implementation, this method does not receive all of the arguments inside a [PhysicsTestMotionParameters2D]. |
| 730 | </description> |
| 731 | </method> |
| 732 | <method name="_capsule_shape_create" qualifiers="virtual required"> |
| 733 | <return type="RID" /> |
| 734 | <description> |
| 735 | Overridable version of [method PhysicsServer2D.capsule_shape_create]. |
| 736 | </description> |
| 737 | </method> |
| 738 | <method name="_circle_shape_create" qualifiers="virtual required"> |
| 739 | <return type="RID" /> |
| 740 | <description> |
| 741 | Overridable version of [method PhysicsServer2D.circle_shape_create]. |
| 742 | </description> |
| 743 | </method> |
| 744 | <method name="_concave_polygon_shape_create" qualifiers="virtual required"> |
| 745 | <return type="RID" /> |
| 746 | <description> |
| 747 | Overridable version of [method PhysicsServer2D.concave_polygon_shape_create]. |
| 748 | </description> |
| 749 | </method> |
| 750 | <method name="_convex_polygon_shape_create" qualifiers="virtual required"> |
| 751 | <return type="RID" /> |
| 752 | <description> |
| 753 | Overridable version of [method PhysicsServer2D.convex_polygon_shape_create]. |
| 754 | </description> |
| 755 | </method> |
| 756 | <method name="_damped_spring_joint_get_param" qualifiers="virtual required const"> |
| 757 | <return type="float" /> |
| 758 | <param index="0" name="joint" type="RID" /> |
| 759 | <param index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" /> |
| 760 | <description> |
| 761 | Overridable version of [method PhysicsServer2D.damped_spring_joint_get_param]. |
| 762 | </description> |
| 763 | </method> |
| 764 | <method name="_damped_spring_joint_set_param" qualifiers="virtual required"> |
| 765 | <return type="void" /> |
| 766 | <param index="0" name="joint" type="RID" /> |
| 767 | <param index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" /> |
| 768 | <param index="2" name="value" type="float" /> |
| 769 | <description> |
| 770 | Overridable version of [method PhysicsServer2D.damped_spring_joint_set_param]. |
| 771 | </description> |
| 772 | </method> |
| 773 | <method name="_end_sync" qualifiers="virtual required"> |
| 774 | <return type="void" /> |
| 775 | <description> |
| 776 | Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also [method _sync]. |
| 777 | Overridable version of [PhysicsServer2D]'s internal [code]end_sync[/code] method. |
| 778 | </description> |
| 779 | </method> |
| 780 | <method name="_finish" qualifiers="virtual required"> |
| 781 | <return type="void" /> |
| 782 | <description> |
| 783 | Called when the main loop finalizes to shut down the physics server. See also [method MainLoop._finalize] and [method _init]. |
| 784 | Overridable version of [PhysicsServer2D]'s internal [code]finish[/code] method. |
| 785 | </description> |
| 786 | </method> |
| 787 | <method name="_flush_queries" qualifiers="virtual required"> |
| 788 | <return type="void" /> |
| 789 | <description> |
| 790 | Called every physics step before [method _step] to process all remaining queries. |
| 791 | Overridable version of [PhysicsServer2D]'s internal [code]flush_queries[/code] method. |
| 792 | </description> |
| 793 | </method> |
| 794 | <method name="_free_rid" qualifiers="virtual required"> |
| 795 | <return type="void" /> |
| 796 | <param index="0" name="rid" type="RID" /> |
| 797 | <description> |
| 798 | Overridable version of [method PhysicsServer2D.free_rid]. |
| 799 | </description> |
| 800 | </method> |
| 801 | <method name="_get_process_info" qualifiers="virtual required"> |
| 802 | <return type="int" /> |
| 803 | <param index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo" /> |
| 804 | <description> |
| 805 | Overridable version of [method PhysicsServer2D.get_process_info]. |
| 806 | </description> |
| 807 | </method> |
| 808 | <method name="_init" qualifiers="virtual required"> |
| 809 | <return type="void" /> |
| 810 | <description> |
| 811 | Called when the main loop is initialized and creates a new instance of this physics server. See also [method MainLoop._initialize] and [method _finish]. |
| 812 | Overridable version of [PhysicsServer2D]'s internal [code]init[/code] method. |
| 813 | </description> |
| 814 | </method> |
| 815 | <method name="_is_flushing_queries" qualifiers="virtual required const"> |
| 816 | <return type="bool" /> |
| 817 | <description> |
| 818 | Overridable method that should return [code]true[/code] when the physics server is processing queries. See also [method _flush_queries]. |
| 819 | Overridable version of [PhysicsServer2D]'s internal [code]is_flushing_queries[/code] method. |
| 820 | </description> |
| 821 | </method> |
| 822 | <method name="_joint_clear" qualifiers="virtual required"> |
| 823 | <return type="void" /> |
| 824 | <param index="0" name="joint" type="RID" /> |
| 825 | <description> |
| 826 | Overridable version of [method PhysicsServer2D.joint_clear]. |
| 827 | </description> |
| 828 | </method> |
| 829 | <method name="_joint_create" qualifiers="virtual required"> |
| 830 | <return type="RID" /> |
| 831 | <description> |
| 832 | Overridable version of [method PhysicsServer2D.joint_create]. |
| 833 | </description> |
| 834 | </method> |
| 835 | <method name="_joint_disable_collisions_between_bodies" qualifiers="virtual required"> |
| 836 | <return type="void" /> |
| 837 | <param index="0" name="joint" type="RID" /> |
| 838 | <param index="1" name="disable" type="bool" /> |
| 839 | <description> |
| 840 | Overridable version of [method PhysicsServer2D.joint_disable_collisions_between_bodies]. |
| 841 | </description> |
| 842 | </method> |
| 843 | <method name="_joint_get_param" qualifiers="virtual required const"> |
| 844 | <return type="float" /> |
| 845 | <param index="0" name="joint" type="RID" /> |
| 846 | <param index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" /> |
| 847 | <description> |
| 848 | Overridable version of [method PhysicsServer2D.joint_get_param]. |
| 849 | </description> |
| 850 | </method> |
| 851 | <method name="_joint_get_type" qualifiers="virtual required const"> |
| 852 | <return type="int" enum="PhysicsServer2D.JointType" /> |
| 853 | <param index="0" name="joint" type="RID" /> |
| 854 | <description> |
| 855 | Overridable version of [method PhysicsServer2D.joint_get_type]. |
| 856 | </description> |
| 857 | </method> |
| 858 | <method name="_joint_is_disabled_collisions_between_bodies" qualifiers="virtual required const"> |
| 859 | <return type="bool" /> |
| 860 | <param index="0" name="joint" type="RID" /> |
| 861 | <description> |
| 862 | Overridable version of [method PhysicsServer2D.joint_is_disabled_collisions_between_bodies]. |
| 863 | </description> |
| 864 | </method> |
| 865 | <method name="_joint_make_damped_spring" qualifiers="virtual required"> |
| 866 | <return type="void" /> |
| 867 | <param index="0" name="joint" type="RID" /> |
| 868 | <param index="1" name="anchor_a" type="Vector2" /> |
| 869 | <param index="2" name="anchor_b" type="Vector2" /> |
| 870 | <param index="3" name="body_a" type="RID" /> |
| 871 | <param index="4" name="body_b" type="RID" /> |
| 872 | <description> |
| 873 | Overridable version of [method PhysicsServer2D.joint_make_damped_spring]. |
| 874 | </description> |
| 875 | </method> |
| 876 | <method name="_joint_make_groove" qualifiers="virtual required"> |
| 877 | <return type="void" /> |
| 878 | <param index="0" name="joint" type="RID" /> |
| 879 | <param index="1" name="a_groove1" type="Vector2" /> |
| 880 | <param index="2" name="a_groove2" type="Vector2" /> |
| 881 | <param index="3" name="b_anchor" type="Vector2" /> |
| 882 | <param index="4" name="body_a" type="RID" /> |
| 883 | <param index="5" name="body_b" type="RID" /> |
| 884 | <description> |
| 885 | Overridable version of [method PhysicsServer2D.joint_make_groove]. |
| 886 | </description> |
| 887 | </method> |
| 888 | <method name="_joint_make_pin" qualifiers="virtual required"> |
| 889 | <return type="void" /> |
| 890 | <param index="0" name="joint" type="RID" /> |
| 891 | <param index="1" name="anchor" type="Vector2" /> |
| 892 | <param index="2" name="body_a" type="RID" /> |
| 893 | <param index="3" name="body_b" type="RID" /> |
| 894 | <description> |
| 895 | Overridable version of [method PhysicsServer2D.joint_make_pin]. |
| 896 | </description> |
| 897 | </method> |
| 898 | <method name="_joint_set_param" qualifiers="virtual required"> |
| 899 | <return type="void" /> |
| 900 | <param index="0" name="joint" type="RID" /> |
| 901 | <param index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" /> |
| 902 | <param index="2" name="value" type="float" /> |
| 903 | <description> |
| 904 | Overridable version of [method PhysicsServer2D.joint_set_param]. |
| 905 | </description> |
| 906 | </method> |
| 907 | <method name="_pin_joint_get_flag" qualifiers="virtual required const"> |
| 908 | <return type="bool" /> |
| 909 | <param index="0" name="joint" type="RID" /> |
| 910 | <param index="1" name="flag" type="int" enum="PhysicsServer2D.PinJointFlag" /> |
| 911 | <description> |
| 912 | Overridable version of [method PhysicsServer2D.pin_joint_get_flag]. |
| 913 | </description> |
| 914 | </method> |
| 915 | <method name="_pin_joint_get_param" qualifiers="virtual required const"> |
| 916 | <return type="float" /> |
| 917 | <param index="0" name="joint" type="RID" /> |
| 918 | <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" /> |
| 919 | <description> |
| 920 | Overridable version of [method PhysicsServer2D.pin_joint_get_param]. |
| 921 | </description> |
| 922 | </method> |
| 923 | <method name="_pin_joint_set_flag" qualifiers="virtual required"> |
| 924 | <return type="void" /> |
| 925 | <param index="0" name="joint" type="RID" /> |
| 926 | <param index="1" name="flag" type="int" enum="PhysicsServer2D.PinJointFlag" /> |
| 927 | <param index="2" name="enabled" type="bool" /> |
| 928 | <description> |
| 929 | Overridable version of [method PhysicsServer2D.pin_joint_set_flag]. |
| 930 | </description> |
| 931 | </method> |
| 932 | <method name="_pin_joint_set_param" qualifiers="virtual required"> |
| 933 | <return type="void" /> |
| 934 | <param index="0" name="joint" type="RID" /> |
| 935 | <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" /> |
| 936 | <param index="2" name="value" type="float" /> |
| 937 | <description> |
| 938 | Overridable version of [method PhysicsServer2D.pin_joint_set_param]. |
| 939 | </description> |
| 940 | </method> |
| 941 | <method name="_rectangle_shape_create" qualifiers="virtual required"> |
| 942 | <return type="RID" /> |
| 943 | <description> |
| 944 | Overridable version of [method PhysicsServer2D.rectangle_shape_create]. |
| 945 | </description> |
| 946 | </method> |
| 947 | <method name="_segment_shape_create" qualifiers="virtual required"> |
| 948 | <return type="RID" /> |
| 949 | <description> |
| 950 | Overridable version of [method PhysicsServer2D.segment_shape_create]. |
| 951 | </description> |
| 952 | </method> |
| 953 | <method name="_separation_ray_shape_create" qualifiers="virtual required"> |
| 954 | <return type="RID" /> |
| 955 | <description> |
| 956 | Overridable version of [method PhysicsServer2D.separation_ray_shape_create]. |
| 957 | </description> |
| 958 | </method> |
| 959 | <method name="_set_active" qualifiers="virtual required"> |
| 960 | <return type="void" /> |
| 961 | <param index="0" name="active" type="bool" /> |
| 962 | <description> |
| 963 | Overridable version of [method PhysicsServer2D.set_active]. |
| 964 | </description> |
| 965 | </method> |
| 966 | <method name="_shape_collide" qualifiers="virtual required"> |
| 967 | <return type="bool" /> |
| 968 | <param index="0" name="shape_A" type="RID" /> |
| 969 | <param index="1" name="xform_A" type="Transform2D" /> |
| 970 | <param index="2" name="motion_A" type="Vector2" /> |
| 971 | <param index="3" name="shape_B" type="RID" /> |
| 972 | <param index="4" name="xform_B" type="Transform2D" /> |
| 973 | <param index="5" name="motion_B" type="Vector2" /> |
| 974 | <param index="6" name="results" type="void*" /> |
| 975 | <param index="7" name="result_max" type="int" /> |
| 976 | <param index="8" name="result_count" type="int32_t*" /> |
| 977 | <description> |
| 978 | Given two shapes and their parameters, should return [code]true[/code] if a collision between the two would occur, with additional details passed in [param results]. |
| 979 | Overridable version of [PhysicsServer2D]'s internal [code]shape_collide[/code] method. Corresponds to [method PhysicsDirectSpaceState2D.collide_shape]. |
| 980 | </description> |
| 981 | </method> |
| 982 | <method name="_shape_get_custom_solver_bias" qualifiers="virtual required const"> |
| 983 | <return type="float" /> |
| 984 | <param index="0" name="shape" type="RID" /> |
| 985 | <description> |
| 986 | Should return the custom solver bias of the given [param shape], which defines how much bodies are forced to separate on contact when this shape is involved. |
| 987 | Overridable version of [PhysicsServer2D]'s internal [code]shape_get_custom_solver_bias[/code] method. Corresponds to [member Shape2D.custom_solver_bias]. |
| 988 | </description> |
| 989 | </method> |
| 990 | <method name="_shape_get_data" qualifiers="virtual required const"> |
| 991 | <return type="Variant" /> |
| 992 | <param index="0" name="shape" type="RID" /> |
| 993 | <description> |
| 994 | Overridable version of [method PhysicsServer2D.shape_get_data]. |
| 995 | </description> |
| 996 | </method> |
| 997 | <method name="_shape_get_type" qualifiers="virtual required const"> |
| 998 | <return type="int" enum="PhysicsServer2D.ShapeType" /> |
| 999 | <param index="0" name="shape" type="RID" /> |
| 1000 | <description> |
| 1001 | Overridable version of [method PhysicsServer2D.shape_get_type]. |
| 1002 | </description> |
| 1003 | </method> |
| 1004 | <method name="_shape_set_custom_solver_bias" qualifiers="virtual required"> |
| 1005 | <return type="void" /> |
| 1006 | <param index="0" name="shape" type="RID" /> |
| 1007 | <param index="1" name="bias" type="float" /> |
| 1008 | <description> |
| 1009 | Should set the custom solver bias for the given [param shape]. It defines how much bodies are forced to separate on contact. |
| 1010 | Overridable version of [PhysicsServer2D]'s internal [code]shape_get_custom_solver_bias[/code] method. Corresponds to [member Shape2D.custom_solver_bias]. |
| 1011 | </description> |
| 1012 | </method> |
| 1013 | <method name="_shape_set_data" qualifiers="virtual required"> |
| 1014 | <return type="void" /> |
| 1015 | <param index="0" name="shape" type="RID" /> |
| 1016 | <param index="1" name="data" type="Variant" /> |
| 1017 | <description> |
| 1018 | Overridable version of [method PhysicsServer2D.shape_set_data]. |
| 1019 | </description> |
| 1020 | </method> |
| 1021 | <method name="_space_create" qualifiers="virtual required"> |
| 1022 | <return type="RID" /> |
| 1023 | <description> |
| 1024 | Overridable version of [method PhysicsServer2D.space_create]. |
| 1025 | </description> |
| 1026 | </method> |
| 1027 | <method name="_space_get_contact_count" qualifiers="virtual required const"> |
| 1028 | <return type="int" /> |
| 1029 | <param index="0" name="space" type="RID" /> |
| 1030 | <description> |
| 1031 | Should return how many contacts have occurred during the last physics step in the given [param space]. See also [method _space_get_contacts] and [method _space_set_debug_contacts]. |
| 1032 | Overridable version of [PhysicsServer2D]'s internal [code]space_get_contact_count[/code] method. |
| 1033 | </description> |
| 1034 | </method> |
| 1035 | <method name="_space_get_contacts" qualifiers="virtual required const"> |
| 1036 | <return type="PackedVector2Array" /> |
| 1037 | <param index="0" name="space" type="RID" /> |
| 1038 | <description> |
| 1039 | Should return the positions of all contacts that have occurred during the last physics step in the given [param space]. See also [method _space_get_contact_count] and [method _space_set_debug_contacts]. |
| 1040 | Overridable version of [PhysicsServer2D]'s internal [code]space_get_contacts[/code] method. |
| 1041 | </description> |
| 1042 | </method> |
| 1043 | <method name="_space_get_direct_state" qualifiers="virtual required"> |
| 1044 | <return type="PhysicsDirectSpaceState2D" /> |
| 1045 | <param index="0" name="space" type="RID" /> |
| 1046 | <description> |
| 1047 | Overridable version of [method PhysicsServer2D.space_get_direct_state]. |
| 1048 | </description> |
| 1049 | </method> |
| 1050 | <method name="_space_get_param" qualifiers="virtual required const"> |
| 1051 | <return type="float" /> |
| 1052 | <param index="0" name="space" type="RID" /> |
| 1053 | <param index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" /> |
| 1054 | <description> |
| 1055 | Overridable version of [method PhysicsServer2D.space_get_param]. |
| 1056 | </description> |
| 1057 | </method> |
| 1058 | <method name="_space_is_active" qualifiers="virtual required const"> |
| 1059 | <return type="bool" /> |
| 1060 | <param index="0" name="space" type="RID" /> |
| 1061 | <description> |
| 1062 | Overridable version of [method PhysicsServer2D.space_is_active]. |
| 1063 | </description> |
| 1064 | </method> |
| 1065 | <method name="_space_set_active" qualifiers="virtual required"> |
| 1066 | <return type="void" /> |
| 1067 | <param index="0" name="space" type="RID" /> |
| 1068 | <param index="1" name="active" type="bool" /> |
| 1069 | <description> |
| 1070 | Overridable version of [method PhysicsServer2D.space_set_active]. |
| 1071 | </description> |
| 1072 | </method> |
| 1073 | <method name="_space_set_debug_contacts" qualifiers="virtual required"> |
| 1074 | <return type="void" /> |
| 1075 | <param index="0" name="space" type="RID" /> |
| 1076 | <param index="1" name="max_contacts" type="int" /> |
| 1077 | <description> |
| 1078 | Used internally to allow the given [param space] to store contact points, up to [param max_contacts]. This is automatically set for the main [World2D]'s space when [member SceneTree.debug_collisions_hint] is [code]true[/code], or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. |
| 1079 | Overridable version of [PhysicsServer2D]'s internal [code]space_set_debug_contacts[/code] method. |
| 1080 | </description> |
| 1081 | </method> |
| 1082 | <method name="_space_set_param" qualifiers="virtual required"> |
| 1083 | <return type="void" /> |
| 1084 | <param index="0" name="space" type="RID" /> |
| 1085 | <param index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" /> |
| 1086 | <param index="2" name="value" type="float" /> |
| 1087 | <description> |
| 1088 | Overridable version of [method PhysicsServer2D.space_set_param]. |
| 1089 | </description> |
| 1090 | </method> |
| 1091 | <method name="_step" qualifiers="virtual required"> |
| 1092 | <return type="void" /> |
| 1093 | <param index="0" name="step" type="float" /> |
| 1094 | <description> |
| 1095 | Called every physics step to process the physics simulation. [param step] is the time elapsed since the last physics step, in seconds. It is usually the same as the value returned by [method Node.get_physics_process_delta_time]. |
| 1096 | Overridable version of [PhysicsServer2D]'s internal [code skip-lint]step[/code] method. |
| 1097 | </description> |
| 1098 | </method> |
| 1099 | <method name="_sync" qualifiers="virtual required"> |
| 1100 | <return type="void" /> |
| 1101 | <description> |
| 1102 | Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also [method _end_sync]. |
| 1103 | Overridable version of [PhysicsServer2D]'s internal [code]sync[/code] method. |
| 1104 | </description> |
| 1105 | </method> |
| 1106 | <method name="_world_boundary_shape_create" qualifiers="virtual required"> |
| 1107 | <return type="RID" /> |
| 1108 | <description> |
| 1109 | Overridable version of [method PhysicsServer2D.world_boundary_shape_create]. |
| 1110 | </description> |
| 1111 | </method> |
| 1112 | <method name="body_test_motion_is_excluding_body" qualifiers="const"> |
| 1113 | <return type="bool" /> |
| 1114 | <param index="0" name="body" type="RID" /> |
| 1115 | <description> |
| 1116 | Returns [code]true[/code] if the body with the given [RID] is being excluded from [method _body_test_motion]. See also [method Object.get_instance_id]. |
| 1117 | </description> |
| 1118 | </method> |
| 1119 | <method name="body_test_motion_is_excluding_object" qualifiers="const"> |
| 1120 | <return type="bool" /> |
| 1121 | <param index="0" name="object" type="int" /> |
| 1122 | <description> |
| 1123 | Returns [code]true[/code] if the object with the given instance ID is being excluded from [method _body_test_motion]. See also [method Object.get_instance_id]. |
| 1124 | </description> |
| 1125 | </method> |
| 1126 | </methods> |
| 1127 | </class> |