Verse Library verse

05 Files

Verse device that spawns and positions a miniboard mesh relative to a camera using spatial transforms.

extracted-snippets/documentation/en-us/fortnite/5-define-the-miniboard/05-files.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/5-define-the-miniboard
# Local doc:  epic-docs/documentation/en-us/fortnite/5-define-the-miniboard.md
# Section:    Files
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Assets }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { DataTypes }
miniboard<public> := class(creative_device):
@editable
CameraDevice:gameplay_camera_fixed_point_device = gameplay_camera_fixed_point_device{}
@editable
StaticMesh:mesh = Meshes.SM_Miniboard
@editable
Dimensions:vector3 = vector3{}
@editable
HitMarkerStaticMesh:mesh = Meshes.SM_Hit
@editable
MissMarkerStaticMesh:mesh = Meshes.SM_Miss
@editable
BoardOffsetFromCameraDevice:vector3 = vector3{}
@editable
GameBoard:board = board{}
var<private> MiniboardProp:?creative_prop = false
Position<public>():void =
CameraTransform := CameraDevice.GetTransform()
StaticMeshRotationCorrection := MakeRotation(vector3{Y := 1.0}, -PiFloat/2.0)
MiniboardTransform:transform = transform:
Translation := CameraTransform.Translation + CameraTransform.Rotation.RotateVector(BoardOffsetFromCameraDevice)

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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