Mechanical

ECS clearly separates the data and the logic operating on that data. This logic in turn is usually executed on an iterative per-frame basis. Apparatus implements this animation-like functionality via a concept called Mechanical. Mechanicals are complex in nature and comprise multiple Mechanics that are executed inside of them.

C++ Workflow

If you’re going the C++ way, creating your Mechanicals goes like this.

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include “CoreMinimal.h” #include “MechanicalActor.h” #include “MyMechanicalActor.generated.h” UCLASS() class MY_API AMyMechanicalActor : public AMechanicalActor {

GENERATED_BODY()

}; </code>

// Fill out your copyright notice in the Description page of Project Settings.

#include “MyMechanicalActor.h” </code>

void Tick(float DeltaTime) override; </code>

void AMyMechanicalActor::Tick(float DeltaTime) {

// Your mechanical code here...

} </code>