You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
fix function used in the code example
This commit is contained in:
parent
a3b42d85d2
commit
510c8e642c
@@ -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:
|
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]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE)
|
var shape_rid = PhysicsServer3D.sphere_shape_create()
|
||||||
var radius = 2.0
|
var radius = 2.0
|
||||||
PhysicsServer3D.shape_set_data(shape_rid, radius)
|
PhysicsServer3D.shape_set_data(shape_rid, radius)
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
PhysicsServer3D.free_rid(shape_rid)
|
PhysicsServer3D.free_rid(shape_rid)
|
||||||
[/gdscript]
|
[/gdscript]
|
||||||
[csharp]
|
[csharp]
|
||||||
RID shapeRid = PhysicsServer3D.ShapeCreate(PhysicsServer3D.ShapeType.Sphere);
|
RID shapeRid = PhysicsServer3D.SphereShapeCreate();
|
||||||
float radius = 2.0f;
|
float radius = 2.0f;
|
||||||
PhysicsServer3D.ShapeSetData(shapeRid, radius);
|
PhysicsServer3D.ShapeSetData(shapeRid, radius);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user