VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Community Snippets›Building & Props·Up to Community Snippets · Building & Props·4 of 7 in Building & Props

Procedural Building Integer Vector

Procedural Building — Integer Vector (vector3i)

A clean, self-contained struct<computes><concrete> for integer-grid math: an X/Y/Z vector3i with overloaded +, -, scalar *, equality, and conversion helpers. The foundation the Procedural Building template builds its voxel grid on. Teaches <computes> (pure) functions, operator overloading, and concrete structs.

From the Procedural Building Template Epic starter project (SampleVerse/ProceduralBuilding/vector3i.verse). Epic Games reference Verse, shown for study.

  • using { /Verse.org/Simulation }
    using { /UnrealEngine.com/Temporary/SpatialMath }
    
    # 3-dimensional vector with `int` components
    vector3i<public> := struct<computes><concrete>:
        @editable
        X<public>:int = 0
    
        @editable
        Y<public>:int = 0
    
        @editable
        Z<public>:int = 0
    
    
    ZeroVector3i:vector3i := vector3i{X:=0, Y:=0, Z:=0}
    
    MakeVector3i<public>(InX:int, InY:int, InZ:int)<computes>:vector3i=
        vector3i{X:=InX, Y:=InY, Z:=InZ}
    
    operator'+'<public>(A:vector3i, B:vector3i)<computes>:vector3i=
        vector3i{X:=A.X + B.X, Y:=A.Y + B.Y, Z:=A.Z + B.Z}
    
    operator'-'<public>(A:vector3i, B:vector3i)<computes>:vector3i=
        vector3i{X:=A.X - B.X, Y:=A.Y - B.Y, Z:=A.Z - B.Z}

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games documentation

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

Keep exploring
More in Building & Props · 4 of 7
Prev
fortnite minecraft styled building mechanic
Next
fortnite how to make a prop follow a path

Source

Epic Games documentation

View original
VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

🦜

Scout · your island guide

The Isle of Verse