reckfellENGINE

VoxelRaycastResult

Result of a raycast performed with VoxelTool.raycast

On this page
class VoxelRaycastResultReckfellSharpInherits RefCounted

Result of a raycast performed with VoxelTool.Raycast

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

VoxelRaycastResultConstructor
# VoxelRaycastResult
C#
public VoxelRaycastResult();

Properties4

DistanceProperty
# Distance
C#
public float Distance { get; }

Distance between the origin of the ray and the surface of the cube representing the hit voxel.

NormalProperty
# Normal
C#
public Vector3 Normal { get; }

Unit vector pointing away from the surface that was hit. This is only available if VoxelTool was configured to compute normals. See VoxelTool.SetRaycastNormalEnabled. With blocky voxels, this normal will be based on collision boxes rather than the mesh.

PositionProperty
# Position
C#
public Vector3I Position { get; }

Integer position of the voxel that was hit. In a blocky game, this would be the position of the voxel to interact with.

PreviousPositionProperty
# PreviousPosition
C#
public Vector3I PreviousPosition { get; }

Integer position of the previous voxel along the ray before the final hit. In a blocky game, this would be the position of the voxel to place on top of the pointed one.

Methods4

GetDistancefloat
# GetDistance
C#
public float GetDistance();
Returns float
GetNormalVector3
# GetNormal
C#
public Vector3 GetNormal();
Returns Vector3
GetPositionVector3I
# GetPosition
C#
public Vector3I GetPosition();
Returns Vector3I
GetPreviousPositionVector3I
# GetPreviousPosition
C#
public Vector3I GetPreviousPosition();
Returns Vector3I
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.