Procedurally Animated Conveyor Belt
71,444 Views
-
using { /Fortnite.com/Devices } using { /Fortnite.com/Devices/CreativeAnimation } using { /Fortnite.com/Game } using { /UnrealEngine.com/Temporary/Diagnostics } using { /UnrealEngine.com/Temporary/SpatialMath } using { /Verse.org/Simulation } # Makes a scalar value go back to 0.0 if it exceeds 1.0 (Number : float).WrapAroundScalar<public>() : float = if(Result := Number - (Floor[Number] * 1.0)) then return Result else return Number # Helper extension function to convert an int to float (Input : int).ToFloat<public>()<computes> : float = Input * 1.0 ConveyorBelt := class(creative_device): @editable Planks : []creative_prop = array{} # Store the first and last locations in the array of planks var StartConveyor : vector3 = vector3{} var EndConveyor : vector3 = vector3{} # Set the constants for the procedural animation @editable TotalMoveTime : float = 30.0 RefreshRate : float = 1.0 / 30.0
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 your BrainDead.TV / BrainDeadGuild Discord account for full access.