Merge pull request #109504 from leandro-benedet-garcia/changed-shape-create-function
Docs: `PhysicsShapeQueryParameters3D` fix function used in code example
This commit is contained in:
commit
cd70d361a7
1 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@
|
|||
The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API:
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE)
|
||||
var shape_rid = PhysicsServer3D.sphere_shape_create()
|
||||
var radius = 2.0
|
||||
PhysicsServer3D.shape_set_data(shape_rid, radius)
|
||||
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
PhysicsServer3D.free_rid(shape_rid)
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
RID shapeRid = PhysicsServer3D.ShapeCreate(PhysicsServer3D.ShapeType.Sphere);
|
||||
RID shapeRid = PhysicsServer3D.SphereShapeCreate();
|
||||
float radius = 2.0f;
|
||||
PhysicsServer3D.ShapeSetData(shapeRid, radius);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue