Verse Library verse

05 Raycasting

Computes 3D voxel grid coordinates from world space position using custom grid dimensions.

extracted-snippets/documentation/en-us/uefn/procedural-building-template-in-unreal-editor-for-fortnite/05-raycasting.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/procedural-building-template-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/procedural-building-template-in-unreal-editor-for-fortnite.md
# Section:    Raycasting
CurrentVoxel := vector3i:
X := Floor[InitialPosition.X / GridSize.X]
Y := Floor[InitialPosition.Y / GridSize.Y]
Z := Floor[InitialPosition.Z / GridSize.Z]

Comments

    Sign in to vote, comment, or suggest an edit. Sign in