[=;77812]
I will do a tutorial when I have enough time, but the core code to spawn constraint at runtime looks like !
//set up the constraint instance with all the desired values
FConstraintInstance ConstraintInstance;
//set values here
ConstraintComp = NewObject<UPhysicsConstraintComponent>(RootSMA);
if(!ConstraintComp) return;
//~~~~~~~~~~~~~~~~~~~~~~~~
//Update Vibes!
ConstraintComp->ConstraintInstance = ConstraintInstance;
//~~~~~~~~~~~~~~~~~~~~~~~~
//Set World Location
ConstraintComp->SetWorldLocation(RootSMA->GetActorLocation());
//Attach to Root!
ConstraintComp->AttachTo(RootSMA->GetRootComponent(), NAME_None, EAttachLocation::KeepWorldPosition);
//~~~ Init Constraint ~~~
ConstraintComp->SetConstrainedComponents(RootSMA->StaticMeshComponent, NAME_None, TargetSMA->StaticMeshComponent,NAME_None);
EDIT never mind it didn’t take that long
I am even sharing my physics constraint library functions with you!
**New Wiki Tutorial
[COLOR="#000000"]Creating Dynamic Physics Constraints During Runtime
My Physics Library Functions Included!**[/COLOR]
https://wiki.unrealengine./Physics_Constraints,_Create_New_Constraints_Dynamically_During_Runtime
[/]
Pffft... show off. Haha, i'm kidding. Great work and thanks for the new tutorial!