engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
FConstraintProfileProperties结构体 参考

Container for properties of a physics constraint that can be easily swapped at runtime. 更多...

#include <ConstraintInstance.h>

Public 成员函数

void Update_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef, float AverageMass, float UseScale) const
 Updates physx joint properties from unreal properties (limits, drives, flags, etc...)
 
void UpdateBreakable_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef) const
 Updates physx joint breakable properties (threshold, etc...)
 
void UpdateConstraintFlags_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef) const
 Updates physx joint flag based on profile properties
 

Public 属性

float AngularBreakThreshold
 Torque needed to break the joint.
 
uint8 bAngularBreakable: 1
 Whether it is possible to break the joint with angular force.
 
uint8 bEnableProjection: 1
 [PhysX] If distance error between bodies exceeds 0.1 units, or rotation error exceeds 10 degrees, body will be projected to fix this. 更多...
 
uint8 bEnableSoftProjection: 1
 [Chaos Only] Apply projection to constraints with soft limits. 更多...
 
uint8 bLinearBreakable: 1
 Whether it is possible to break the joint with linear force.
 
float LinearBreakThreshold
 Force needed to break the distance constraint.
 
float ProjectionAngularAlpha
 [Chaos Only] How much angular projection to apply [0-1]. 更多...
 
float ProjectionAngularTolerance
 [PhysX only] Angular tolerance value in world units. 更多...
 
float ProjectionLinearAlpha
 [Chaos Only] How much linear projection to apply [0-1]. 更多...
 
float ProjectionLinearTolerance
 [PhysX only] Linear tolerance value in world units. 更多...
 

详细描述

Container for properties of a physics constraint that can be easily swapped at runtime.

This is useful for switching different setups when going from ragdoll to standup for example

类成员变量说明

◆ bEnableProjection

uint8 FConstraintProfileProperties::bEnableProjection

[PhysX] If distance error between bodies exceeds 0.1 units, or rotation error exceeds 10 degrees, body will be projected to fix this.

For example a chain spinning too fast will have its elements appear detached due to velocity, this will project all bodies so they still appear attached to each other.

[Chaos] Chaos applies a post-solve position and angular fixup where the parent body in the constraint is treated as having infinite mass and the child body is translated and rotated to resolve any remaining errors. This can be used to make constraint chains significantly stiffer at lower iteration counts. Increasing iterations would have the same effect, but be much more expensive. Projection only works well if the chain is not interacting with other objects (e.g., through collisions) because the projection of the bodies in the chain will cause other constraints to be violated. Likewise, if a body is influenced by multiple constraints, then enabling projection on more than one constraint may lead to unexpected results - the "last" constraint would win but the order in which constraints are solved cannot be directly controlled.

Note: projection will not be applied to constraints with soft limits.

◆ bEnableSoftProjection

uint8 FConstraintProfileProperties::bEnableSoftProjection

[Chaos Only] Apply projection to constraints with soft limits.

This can be used to stiffen up soft joints at low iteration counts, but the projection will override a lot of the spring-damper behaviour of the soft limits. E.g., if you have soft projection enabled and ProjectionAngularAlpha = 1.0, the joint will act as if it is a hard limit.

◆ ProjectionAngularAlpha

float FConstraintProfileProperties::ProjectionAngularAlpha

[Chaos Only] How much angular projection to apply [0-1].

Projection fixes any post-solve angle error in the constraint.

◆ ProjectionAngularTolerance

float FConstraintProfileProperties::ProjectionAngularTolerance

[PhysX only] Angular tolerance value in world units.

If the distance error exceeds this tolerence limit, the body will be projected.

◆ ProjectionLinearAlpha

float FConstraintProfileProperties::ProjectionLinearAlpha

[Chaos Only] How much linear projection to apply [0-1].

Projection fixes any post-solve position error in the constraint.

◆ ProjectionLinearTolerance

float FConstraintProfileProperties::ProjectionLinearTolerance

[PhysX only] Linear tolerance value in world units.

If the distance error exceeds this tolerence limit, the body will be projected.


该结构体的文档由以下文件生成: