UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ConstraintInstanceBlueprintLibrary.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
8
9#include "ConstraintInstanceBlueprintLibrary.generated.h"
10
11UCLASS(MinimalAPI)
13{
15
16public:
17 //---------------------------------------------------------------------------------------------------
18 //
19 // CONSTRAINT BODIES
20 //
21 //---------------------------------------------------------------------------------------------------
22
28 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "rigid body name name parent child"))
29 static ENGINE_API void GetAttachedBodyNames(
31 FName& ParentBody,
33 );
34
35 //---------------------------------------------------------------------------------------------------
36 //
37 // CONSTRAINT BEHAVIOR
38 //
39 //---------------------------------------------------------------------------------------------------
40
45 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "disable enable collision"))
46 static ENGINE_API void SetDisableCollision(
48 bool bDisableCollision
49 );
50
54 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "disable enable collision"))
55 static ENGINE_API bool GetDisableCollsion(UPARAM(ref) FConstraintInstanceAccessor& Accessor);
56
63 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "enable linear angular"))
64 static ENGINE_API void SetProjectionParams(
66 bool bEnableProjection,
67 float ProjectionLinearAlpha,
68 float ProjectionAngularAlpha
69 );
70
77 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "enable linear angular"))
78 static ENGINE_API void GetProjectionParams(
80 bool& bEnableProjection,
81 float& ProjectionLinearAlpha,
82 float& ProjectionAngularAlpha
83 );
84
89 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
90 static ENGINE_API void SetParentDominates(
92 bool bParentDominates
93 );
94
98 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
99 static ENGINE_API bool GetParentDominates(UPARAM(ref) FConstraintInstanceAccessor& Accessor);
100
104 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
105 static ENGINE_API void SetMassConditioningEnabled(
106 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
107 bool bEnableMassConditioning);
108
112 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
113 static ENGINE_API bool GetMassConditioningEnabled(UPARAM(ref) FConstraintInstanceAccessor& Accessor);
114
115
116 //---------------------------------------------------------------------------------------------------
117 //
118 // LINEAR LIMITS
119 //
120 //---------------------------------------------------------------------------------------------------
121
129 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motion free limited locked linear angular"))
130 static ENGINE_API void SetLinearLimits(
131 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
135 float Limit
136 );
137
145 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motion free limited locked linear angular"))
146 static ENGINE_API void GetLinearLimits(
147 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
151 float& Limit
152 );
153
162 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "soft stiffness damping restitution contact distance"))
163 static ENGINE_API void SetLinearSoftLimitParams(
164 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
165 bool bSoftLinearLimit,
167 float LinearLimitDamping,
170 );
171
180 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "soft stiffness damping restitution contact distance"))
181 static ENGINE_API void GetLinearSoftLimitParams(
182 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
183 bool& bSoftLinearLimit,
185 float& LinearLimitDamping,
188 );
189
195 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
196 static ENGINE_API void SetLinearBreakable(
197 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
198 bool bLinearBreakable,
199 float LinearBreakThreshold
200 );
201
207 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
208 static ENGINE_API void GetLinearBreakable(
209 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
210 bool& bLinearBreakable,
211 float& LinearBreakThreshold
212 );
213
214
220 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
221 static ENGINE_API void SetLinearPlasticity(
222 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
223 bool bLinearPlasticity,
224 float LinearPlasticityThreshold,
226 );
227
233 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
234 static ENGINE_API void GetLinearPlasticity(
235 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
236 bool& bLinearPlasticity,
237 float& LinearPlasticityThreshold,
239 );
240
241 //---------------------------------------------------------------------------------------------------
242 //
243 // Contact Transfer
244 //
245 //---------------------------------------------------------------------------------------------------
246
251 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
252 static ENGINE_API void GetContactTransferScale(
253 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
254 float& ContactTransferScale
255 );
256
261 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
262 static ENGINE_API void SetContactTransferScale(
263 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
264 float ContactTransferScale
265 );
266
267 //---------------------------------------------------------------------------------------------------
268 //
269 // ANGULAR LIMITS
270 //
271 //---------------------------------------------------------------------------------------------------
272
282 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "swing twist motion free limited locked"))
283 static ENGINE_API void SetAngularLimits(
284 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
286 float Swing1LimitAngle,
288 float Swing2LimitAngle,
290 float TwistLimitAngle
291 );
292
302 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "swing twist motion free limited locked"))
303 static ENGINE_API void GetAngularLimits(
304 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
306 float& Swing1LimitAngle,
308 float& Swing2LimitAngle,
310 float& TwistLimitAngle
311 );
312
321 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "soft stiffness damping restitution contact distance"))
322 static ENGINE_API void SetAngularSoftSwingLimitParams(
323 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
324 bool bSoftSwingLimit,
326 float SwingLimitDamping,
329 );
330
339 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "soft stiffness damping restitution contact distance"))
340 static ENGINE_API void GetAngularSoftSwingLimitParams(
341 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
342 bool& bSoftSwingLimit,
343 float& SwingLimitStiffness,
344 float& SwingLimitDamping,
347 );
348
357 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "soft stiffness damping restitution contact distance"))
358 static ENGINE_API void SetAngularSoftTwistLimitParams(
359 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
360 bool bSoftTwistLimit,
362 float TwistLimitDamping,
365 );
366
375 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "soft stiffness damping restitution contact distance"))
376 static ENGINE_API void GetAngularSoftTwistLimitParams(
377 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
378 bool& bSoftTwistLimit,
379 float& TwistLimitStiffness,
380 float& TwistLimitDamping,
383 );
384
390 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
391 static ENGINE_API void SetAngularBreakable(
392 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
393 bool bAngularBreakable,
394 float AngularBreakThreshold
395 );
396
402 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
403 static ENGINE_API void GetAngularBreakable(
404 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
405 bool& bAngularBreakable,
406 float& AngularBreakThreshold
407 );
408
414 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
415 static ENGINE_API void SetAngularPlasticity(
416 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
417 bool bAngularPlasticity,
418 float AngularPlasticityThreshold
419 );
420
426 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
427 static ENGINE_API void GetAngularPlasticity(
428 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
429 bool& bAngularPlasticity,
430 float& AngularPlasticityThreshold
431 );
432
433 //---------------------------------------------------------------------------------------------------
434 //
435 // LINEAR MOTOR
436 //
437 //---------------------------------------------------------------------------------------------------
438
445 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor position target"))
446 static ENGINE_API void SetLinearPositionDrive(
447 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
448 bool bEnableDriveX,
449 bool bEnableDriveY,
450 bool bEnableDriveZ
451 );
452
459 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor position target"))
460 static ENGINE_API void GetLinearPositionDrive(
461 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
462 bool& bOutEnableDriveX,
463 bool& bOutEnableDriveY,
464 bool& bOutEnableDriveZ
465 );
466
473 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor velocity target"))
474 static ENGINE_API void SetLinearVelocityDrive(
475 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
476 bool bEnableDriveX,
477 bool bEnableDriveY,
478 bool bEnableDriveZ
479 );
480
487 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor velocity target"))
488 static ENGINE_API void GetLinearVelocityDrive(
489 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
490 bool& bOutEnableDriveX,
491 bool& bOutEnableDriveY,
492 bool& bOutEnableDriveZ
493 );
494
499 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
500 static ENGINE_API void SetLinearPositionTarget(
501 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
502 const FVector& InPosTarget
503 );
504
509 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
510 static ENGINE_API void GetLinearPositionTarget(
511 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
513 );
514
519 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
520 static ENGINE_API void SetLinearVelocityTarget(
521 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
522 const FVector& InVelTarget
523 );
524
529 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
530 static ENGINE_API void GetLinearVelocityTarget(
531 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
533 );
534
541 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor position velocity target strength max force"))
542 static ENGINE_API void SetLinearDriveParams(
543 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
544 float PositionStrength,
545 float VelocityStrength,
546 float InForceLimit
547 );
548
555 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor position velocity target strength max force"))
556 static ENGINE_API void GetLinearDriveParams(
557 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
558 float& OutPositionStrength,
559 float& OutVelocityStrength,
560 float& OutForceLimit
561 );
562
563 //---------------------------------------------------------------------------------------------------
564 //
565 // ANGULAR MOTOR
566 //
567 //---------------------------------------------------------------------------------------------------
568
574 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
575 static ENGINE_API void SetOrientationDriveTwistAndSwing(
576 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
577 bool bEnableTwistDrive,
579 );
580
586 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
587 static ENGINE_API void GetOrientationDriveTwistAndSwing(
588 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
591 );
592
597 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
598 static ENGINE_API void SetOrientationDriveSLERP(
599 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
600 bool bEnableSLERP
601 );
602
607 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
608 static ENGINE_API void GetOrientationDriveSLERP(
609 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
610 bool& bOutEnableSLERP
611 );
612
618 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
619 static ENGINE_API void SetAngularVelocityDriveTwistAndSwing(
620 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
621 bool bEnableTwistDrive,
623 );
624
630 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
631 static ENGINE_API void GetAngularVelocityDriveTwistAndSwing(
632 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
635 );
636
641 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
642 static ENGINE_API void SetAngularVelocityDriveSLERP(
643 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
644 bool bEnableSLERP
645 );
646
651 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target"))
652 static ENGINE_API void GetAngularVelocityDriveSLERP(
653 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
654 bool& bOutEnableSLERP
655 );
656
661 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
662 static ENGINE_API void SetAngularDriveMode(
663 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
665 );
666
671 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
672 static ENGINE_API void GetAngularDriveMode(
673 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
675 );
676
681 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
682 static ENGINE_API void SetAngularOrientationTarget(
683 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
684 const FRotator& InPosTarget
685 );
686
691 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
692 static ENGINE_API void GetAngularOrientationTarget(
693 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
695 );
696
701 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
702 static ENGINE_API void SetAngularVelocityTarget(
703 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
704 const FVector& InVelTarget
705 );
706
711 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor"))
712 static ENGINE_API void GetAngularVelocityTarget(
713 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
715 );
716
723 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target orientation velocity strength max force"))
724 static ENGINE_API void SetAngularDriveParams(
725 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
726 float PositionStrength,
727 float VelocityStrength,
728 float InForceLimit
729 );
730
737 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints", meta = (Keywords = "motor target orientation velocity strength max force"))
738 static ENGINE_API void GetAngularDriveParams(
739 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
740 float& OutPositionStrength,
741 float& OutVelocityStrength,
742 float& OutForceLimit
743 );
744
751 UFUNCTION(BlueprintCallable, Category = "Physics|Constraints")
752 static ENGINE_API void CopyParams(
753 UPARAM(ref) FConstraintInstanceAccessor& Accessor,
755 bool bKeepPosition = true,
756 bool bKeepRotation = true
757 );
758};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPARAM(...)
Definition ObjectMacros.h:748
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition NameTypes.h:617
Definition EnumAsByte.h:22
Definition BlueprintFunctionLibrary.h:16
Definition ConstraintInstanceBlueprintLibrary.h:13
Type
Definition ConstraintDrives.h:13
Definition ConstraintInstance.h:1238