[=BlackRang666;76203]
I love your tutorials. If its something you think others might benefit from too, I would love to see one on spawning physics constraints at runtime.
[/]
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
[=;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!
**New Tutorial!
** Wiki Tutorial on Global Data Storage https://wiki.unrealengine./Global_Data_Access,_Data_Storage_Class_Accessible_From_Any_CPP_or_BP_Class_During_Runtime!
Heheh you are such an extraordinary good person!
you have helped me out soo much and I bet lots of other people too,
it comes a bit late, but just wanted to finally thank you for all the amasing stuff you have put out there
[=real;101961]
Heheh you are such an extraordinary good person!
you have helped me out soo much and I bet lots of other people too,
it comes a bit late, but just wanted to finally thank you for all the amasing stuff you have put out there
[/]
I want to take opportunity to thank you as well.
Your tutorials help me out a lot of times, I don’t know what I would do without them
So… thank you so much for your efforts, dude!
[=Rakantor;103581]
I want to take opportunity to thank you as well.
Your tutorials help me out a lot of times, I don’t know what I would do without them
So… thank you so much for your efforts, dude!
[/]