Click or drag to resize

VisualServerInstancesCullRay Method

Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as MeshInstance or DirectionalLight. Use @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.

Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Array InstancesCullRay(
	Vector3 from,
	Vector3 to,
	RID scenario = null
)

Parameters

from
Type: GodotVector3

[Missing <param name="from"/> documentation for "M:Godot.VisualServer.InstancesCullRay(Godot.Vector3,Godot.Vector3,Godot.RID)"]

to
Type: GodotVector3

[Missing <param name="to"/> documentation for "M:Godot.VisualServer.InstancesCullRay(Godot.Vector3,Godot.Vector3,Godot.RID)"]

scenario (Optional)
Type: GodotRID

[Missing <param name="scenario"/> documentation for "M:Godot.VisualServer.InstancesCullRay(Godot.Vector3,Godot.Vector3,Godot.RID)"]

Return Value

Type: Array

[Missing <returns> documentation for "M:Godot.VisualServer.InstancesCullRay(Godot.Vector3,Godot.Vector3,Godot.RID)"]

See Also