Implement 'Set Tangible Plane'

This commit is contained in:
2023-09-25 18:32:05 -04:00
parent 254524aab6
commit cc6509a69c
3 changed files with 26 additions and 5 deletions

View File

@@ -11,6 +11,19 @@ UTangibleComponent::UTangibleComponent()
void UTangibleComponent::Init(UTangibleManager* tm, AActor* a, int64 id)
{
TangibleManager = tm;
Actor = a;
OwningActor = a;
TangibleId = id;
}
FString UTangibleComponent::GetTangiblePlane(AActor* actor) {
UTangibleComponent* comp = actor->GetComponentByClass<UTangibleComponent>();
check(comp != nullptr);
return comp->Plane;
}
void UTangibleComponent::SetTangiblePlane(AActor* actor, const FString& plane) {
UTangibleComponent* comp = actor->GetComponentByClass<UTangibleComponent>();
check(comp != nullptr);
comp->Plane = plane;
}