|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Container for a physics representation of an object. More...
Public Member Functions | |
Functions | |
| void | SetbOverrideMaxDepenetrationVelocity (bool Value) |
| Whether this body instance has its own custom MaxDepenetrationVelocity. | |
| bool | Weld (FBodyInstance &TheirBody, FTransform TheirTM) |
| void | UnWeld (FBodyInstance &TheirBI) |
| void | SetUseCCD (bool bInUseCCD) |
| bool | GetbUseCCD () const |
| If true Continuous Collision Detection (CCD) will be used for this component. | |
| void | SetbUseCCD (bool Value) |
| If true Continuous Collision Detection (CCD) will be used for this component. | |
| void | SetbUseMACD (bool Value) |
| [EXPERIMENTAL] If true Motion-Aware Collision Detection (MACD) will be used for this component | |
| bool | GetbIgnoreAnalyticCollisions () const |
| If true ignore analytic collisions and treat objects as a general implicit surface. | |
| void | SetbIgnoreAnalyticCollisions (bool Value) |
| If true ignore analytic collisions and treat objects as a general implicit surface. | |
| bool | GetbNotifyRigidBodyCollision () const |
| Should 'Hit' events fire when this object collides during physics simulation. | |
| void | SetbNotifyRigidBodyCollision (bool Value) |
| Should 'Hit' events fire when this object collides during physics simulation. | |
| bool | GetbSmoothEdgeCollisions () const |
| Remove unnecessary edge collisions to allow smooth sliding over surfaces composed of multiple actors/components. This is fairly expensive and should only be enabled on hero objects. | |
| void | SetbSmoothEdgeCollisions (bool Value) |
| Remove unnecessary edge collisions to allow smooth sliding over surfaces composed of multiple actors/components. This is fairly expensive and should only be enabled on hero objects. | |
| void | SetbLockTranslation (bool Value) |
| [Physx Only] When a Locked Axis Mode is selected, will lock translation on the specified axis | |
| void | SetbLockRotation (bool Value) |
| [Physx Only] When a Locked Axis Mode is selected, will lock rotation to the specified axis | |
| void | SetbLockXTranslation (bool Value) |
| [Physx Only] Lock translation along the X-axis | |
| void | SetbLockYTranslation (bool Value) |
| [Physx Only] Lock translation along the Y-axis | |
| void | SetbLockZTranslation (bool Value) |
| [Physx Only] Lock translation along the Z-axis | |
| void | SetbLockXRotation (bool Value) |
| [Physx Only] Lock rotation about the X-axis | |
| void | SetbLockYRotation (bool Value) |
| [Physx Only] Lock rotation about the Y-axis | |
| void | SetbLockZRotation (bool Value) |
| [Physx Only] Lock rotation about the Z-axis | |
| void | SetbOverrideMaxAngularVelocity (bool Value) |
| Override the default max angular velocity. | |
| UBodySetup | GetBodySetup () const |
| void | SetbOverrideWalkableSlopeOnInstance (bool Value) |
| Whether this instance of the object has its own custom walkable slope override setting. | |
| bool | GetbInertiaConditioning () const |
| @brief Enable automatic inertia conditioning to stabilize constraints. | |
| void | SetbInertiaConditioning (bool Value) |
| @brief Enable automatic inertia conditioning to stabilize constraints. | |
| bool | GetbOneWayInteraction () const |
| If set to true, this body will treat bodies that do not have the flag set as having infinite mass. | |
| void | SetbOneWayInteraction (bool Value) |
| If set to true, this body will treat bodies that do not have the flag set as having infinite mass. | |
| bool | GetbOverrideSolverAsyncDeltaTime () const |
| Set the desired delta time for the body. *. | |
| void | SetbOverrideSolverAsyncDeltaTime (bool Value) |
| Set the desired delta time for the body. *. | |
| bool | GetbSimulatePhysics () const |
| If true, this body will use simulation. If false, will be 'fixed' (ie kinematic) and move where it is told. For a Skeletal Mesh Component, simulating requires a physics asset setup and assigned on the SkeletalMesh asset. For a Static Mesh Component, simulating requires simple collision to be setup on the StaticMesh asset. | |
| void | SetbSimulatePhysics (bool Value) |
| If true, this body will use simulation. If false, will be 'fixed' (ie kinematic) and move where it is told. For a Skeletal Mesh Component, simulating requires a physics asset setup and assigned on the SkeletalMesh asset. For a Static Mesh Component, simulating requires simple collision to be setup on the StaticMesh asset. | |
| void | SetbOverrideMass (bool Value) |
| If true, mass will not be automatically computed and you must set it directly. | |
| bool | GetbEnableGravity () const |
| If object should have the force of gravity applied. | |
| void | SetbEnableGravity (bool Value) |
| If object should have the force of gravity applied. | |
| bool | GetbUpdateKinematicFromSimulation () const |
| When kinematic, whether the actor transform should be updated as a result of movement in the simulation, rather than immediately whenever a target transform is set. | |
| void | SetbUpdateKinematicFromSimulation (bool Value) |
| When kinematic, whether the actor transform should be updated as a result of movement in the simulation, rather than immediately whenever a target transform is set. | |
| bool | GetbAutoWeld () const |
| If true and is attached to a parent, the two bodies will be joined into a single rigid body. Physical settings like collision profile and body settings are determined by the root. | |
| void | SetbAutoWeld (bool Value) |
| If true and is attached to a parent, the two bodies will be joined into a single rigid body. Physical settings like collision profile and body settings are determined by the root. | |
| bool | GetbStartAwake () const |
| If object should start awake, or if it should initially be sleeping. | |
| void | SetbStartAwake (bool Value) |
| If object should start awake, or if it should initially be sleeping. | |
| bool | GetbGenerateWakeEvents () const |
| Should 'wake/sleep' events fire when this object is woken up or put to sleep by the physics simulation. | |
| void | SetbGenerateWakeEvents (bool Value) |
| Should 'wake/sleep' events fire when this object is woken up or put to sleep by the physics simulation. | |
| bool | GetbUpdateMassWhenScaleChanges () const |
| If true, it will update mass when scale change *. | |
| void | SetbUpdateMassWhenScaleChanges (bool Value) |
| If true, it will update mass when scale change *. | |
| Public Member Functions inherited from FBodyInstanceCore | |
| bool | GetbAutoWeld () const |
| If true and is attached to a parent, the two bodies will be joined into a single rigid body. Physical settings like collision profile and body settings are determined by the root. | |
| bool | GetbSimulatePhysics () const |
| If true, this body will use simulation. If false, will be 'fixed' (ie kinematic) and move where it is told. For a Skeletal Mesh Component, simulating requires a physics asset setup and assigned on the SkeletalMesh asset. For a Static Mesh Component, simulating requires simple collision to be setup on the StaticMesh asset. | |
| void | SetbSimulatePhysics (bool Value) |
| If true, this body will use simulation. If false, will be 'fixed' (ie kinematic) and move where it is told. For a Skeletal Mesh Component, simulating requires a physics asset setup and assigned on the SkeletalMesh asset. For a Static Mesh Component, simulating requires simple collision to be setup on the StaticMesh asset. | |
| void | SetbOverrideMass (bool Value) |
| If true, mass will not be automatically computed and you must set it directly. | |
| bool | GetbEnableGravity () const |
| If object should have the force of gravity applied. | |
| void | SetbEnableGravity (bool Value) |
| If object should have the force of gravity applied. | |
| bool | GetbUpdateKinematicFromSimulation () const |
| When kinematic, whether the actor transform should be updated as a result of movement in the simulation, rather than immediately whenever a target transform is set. | |
| void | SetbUpdateKinematicFromSimulation (bool Value) |
| When kinematic, whether the actor transform should be updated as a result of movement in the simulation, rather than immediately whenever a target transform is set. | |
| FBodyInstanceCore & | opAssign (FBodyInstanceCore Other) |
| void | SetbAutoWeld (bool Value) |
| If true and is attached to a parent, the two bodies will be joined into a single rigid body. Physical settings like collision profile and body settings are determined by the root. | |
| bool | GetbStartAwake () const |
| If object should start awake, or if it should initially be sleeping. | |
| void | SetbStartAwake (bool Value) |
| If object should start awake, or if it should initially be sleeping. | |
| bool | GetbGenerateWakeEvents () const |
| Should 'wake/sleep' events fire when this object is woken up or put to sleep by the physics simulation. | |
| void | SetbGenerateWakeEvents (bool Value) |
| Should 'wake/sleep' events fire when this object is woken up or put to sleep by the physics simulation. | |
| bool | GetbUpdateMassWhenScaleChanges () const |
| If true, it will update mass when scale change *. | |
| void | SetbUpdateMassWhenScaleChanges (bool Value) |
| If true, it will update mass when scale change *. | |
Public Attributes | |
Collision | |
| UPhysicalMaterial | PhysMaterialOverride |
| Allows you to override the PhysicalMaterial to use for simple collision on this body. | |
Custom | |
| FName | CollisionProfileName |
| Collision Profile Name *. | |
| FCollisionResponse | CollisionResponses |
| Custom Channels for Responses. | |
| ECollisionEnabled | CollisionEnabled |
| Type of collision enabled. | |
| ECollisionChannel | ObjectType |
| Enum indicating what type of object this should be considered as when it moves. | |
Physics | |
| uint8 | PositionSolverIterationCount |
| [PhysX Only] This physics body's solver iteration count for position. Increasing this will be more CPU intensive, but better stabilized. | |
| uint8 | VelocitySolverIterationCount |
| [PhysX Only] This physics body's solver iteration count for velocity. Increasing this will be more CPU intensive, but better stabilized. | |
| float32 | SolverAsyncDeltaTime |
| Override value for physics solver async delta time. With multiple actors specifying this, the solver will use the smallest delta time *. | |
| EDOFMode | DOFMode |
| [Physx Only] Locks physical movement along specified axis. | |
| ESleepFamily | SleepFamily |
| The set of values used in considering when put this body to sleep. | |
| float32 | MaxDepenetrationVelocity |
| The maximum velocity used to depenetrate this object from others when spawned or teleported with initial overlaps (does not affect overlaps as a result of normal movement). A value of zero will allow objects that are spawned overlapping to go to sleep without moving rather than pop out of each other. E.g., use zero if you spawn dynamic rocks partially embedded in the ground and want them to be interactive but not pop out of the ground when touched. A negative value is equivalent to bOverrideMaxDepenetrationVelocity = false, meaning use the project setting. This overrides the CollisionInitialOverlapDepenetrationVelocity project setting on a per-body basis (and not the MaxDepenetrationVelocity solver setting that will be deprecated). | |
| float32 | LinearDamping |
| 'Drag' force added to reduce linear movement | |
| float32 | AngularDamping |
| 'Drag' force added to reduce angular movement | |
| FVector | CustomDOFPlaneNormal |
| Locks physical movement along a custom plane for a given normal. | |
| FVector | COMNudge |
| User specified offset for the center of mass of this object, from the calculated location. | |
| float32 | MassScale |
| Per-instance scaling of mass. | |
| FVector | InertiaTensorScale |
| Per-instance scaling of inertia (bigger number means it'll be harder to rotate). | |
| FWalkableSlopeOverride | WalkableSlopeOverride |
| Custom walkable slope override setting for this instance. @see GetWalkableSlopeOverride(), SetWalkableSlopeOverride(). | |
| float32 | MassInKgOverride |
| Mass of the body in KG. By default we compute this based on physical material and mass scale. @see bOverrideMass to set this directly. | |
| float32 | MaxAngularVelocity |
| The maximum angular velocity for this instance [degrees/s]. | |
| float32 | CustomSleepThresholdMultiplier |
| If the SleepFamily is set to custom, multiply the natural sleep threshold by this amount. A higher number will cause the body to sleep sooner. | |
| float32 | StabilizationThresholdMultiplier |
| Stabilization factor for this body if Physics stabilization is enabled. A higher number will cause more aggressive stabilization at the risk of loss of momentum at low speeds. A value of 0 will disable stabilization for this body. | |
Variables | |
| bool | bOverrideSolverAsyncDeltaTime |
| bool | bUseCCD |
| bool | bIgnoreAnalyticCollisions |
| bool | bNotifyRigidBodyCollision |
| bool | bSmoothEdgeCollisions |
| bool | bInertiaConditioning |
| bool | bOneWayInteraction |
| const UBodySetup | BodySetup |
| bool | bSimulatePhysics |
| bool | bEnableGravity |
| bool | bUpdateKinematicFromSimulation |
| bool | bAutoWeld |
| bool | bStartAwake |
| bool | bGenerateWakeEvents |
| bool | bUpdateMassWhenScaleChanges |
| Public Attributes inherited from FBodyInstanceCore | |
| bool | bEnableGravity |
| bool | bUpdateKinematicFromSimulation |
| bool | bAutoWeld |
| bool | bStartAwake |
| bool | bGenerateWakeEvents |
| bool | bUpdateMassWhenScaleChanges |
| bool | bSimulatePhysics |
Container for a physics representation of an object.
| bool GetbAutoWeld | ( | ) | const |
If true and is attached to a parent, the two bodies will be joined into a single rigid body. Physical settings like collision profile and body settings are determined by the root.
| bool GetbEnableGravity | ( | ) | const |
If object should have the force of gravity applied.
| bool GetbGenerateWakeEvents | ( | ) | const |
Should 'wake/sleep' events fire when this object is woken up or put to sleep by the physics simulation.
| bool GetbIgnoreAnalyticCollisions | ( | ) | const |
If true ignore analytic collisions and treat objects as a general implicit surface.
| bool GetbInertiaConditioning | ( | ) | const |
@brief Enable automatic inertia conditioning to stabilize constraints.
Inertia conitioning increases inertia when an object is long and thin and also when it has joints that are outside the collision shapes of the body. Increasing the inertia reduces the amount of rotation applied at joints which helps stabilize joint chains, especially when bodies are small. In principle you can get the same behaviour by setting the InertiaTensorScale appropriately, but this takes some of the guesswork out of it.
Note: This only changes the inertia used in the low-level solver. That inertia is not visible to the BodyInstance which will still report the inertia calculated from the mass, shapes, and InertiaTensorScale.
Note: When enabled, the effective inertia depends on the joints attached to the body so the inertia will change when joints are added or removed (automatically - no user action required).
| bool GetbNotifyRigidBodyCollision | ( | ) | const |
Should 'Hit' events fire when this object collides during physics simulation.
| UBodySetup GetBodySetup | ( | ) | const |
| bool GetbOneWayInteraction | ( | ) | const |
If set to true, this body will treat bodies that do not have the flag set as having infinite mass.
| bool GetbOverrideSolverAsyncDeltaTime | ( | ) | const |
Set the desired delta time for the body. *.
| bool GetbSimulatePhysics | ( | ) | const |
If true, this body will use simulation. If false, will be 'fixed' (ie kinematic) and move where it is told. For a Skeletal Mesh Component, simulating requires a physics asset setup and assigned on the SkeletalMesh asset. For a Static Mesh Component, simulating requires simple collision to be setup on the StaticMesh asset.
| bool GetbSmoothEdgeCollisions | ( | ) | const |
Remove unnecessary edge collisions to allow smooth sliding over surfaces composed of multiple actors/components. This is fairly expensive and should only be enabled on hero objects.
| bool GetbStartAwake | ( | ) | const |
If object should start awake, or if it should initially be sleeping.
| bool GetbUpdateKinematicFromSimulation | ( | ) | const |
When kinematic, whether the actor transform should be updated as a result of movement in the simulation, rather than immediately whenever a target transform is set.
| bool GetbUpdateMassWhenScaleChanges | ( | ) | const |
If true, it will update mass when scale change *.
| bool GetbUseCCD | ( | ) | const |
If true Continuous Collision Detection (CCD) will be used for this component.
| void SetbAutoWeld | ( | bool | Value | ) |
If true and is attached to a parent, the two bodies will be joined into a single rigid body. Physical settings like collision profile and body settings are determined by the root.
| void SetbEnableGravity | ( | bool | Value | ) |
If object should have the force of gravity applied.
| void SetbGenerateWakeEvents | ( | bool | Value | ) |
Should 'wake/sleep' events fire when this object is woken up or put to sleep by the physics simulation.
| void SetbIgnoreAnalyticCollisions | ( | bool | Value | ) |
If true ignore analytic collisions and treat objects as a general implicit surface.
| void SetbInertiaConditioning | ( | bool | Value | ) |
@brief Enable automatic inertia conditioning to stabilize constraints.
Inertia conitioning increases inertia when an object is long and thin and also when it has joints that are outside the collision shapes of the body. Increasing the inertia reduces the amount of rotation applied at joints which helps stabilize joint chains, especially when bodies are small. In principle you can get the same behaviour by setting the InertiaTensorScale appropriately, but this takes some of the guesswork out of it.
Note: This only changes the inertia used in the low-level solver. That inertia is not visible to the BodyInstance which will still report the inertia calculated from the mass, shapes, and InertiaTensorScale.
Note: When enabled, the effective inertia depends on the joints attached to the body so the inertia will change when joints are added or removed (automatically - no user action required).
| void SetbLockRotation | ( | bool | Value | ) |
[Physx Only] When a Locked Axis Mode is selected, will lock rotation to the specified axis
| void SetbLockTranslation | ( | bool | Value | ) |
[Physx Only] When a Locked Axis Mode is selected, will lock translation on the specified axis
| void SetbLockXRotation | ( | bool | Value | ) |
[Physx Only] Lock rotation about the X-axis
| void SetbLockXTranslation | ( | bool | Value | ) |
[Physx Only] Lock translation along the X-axis
| void SetbLockYRotation | ( | bool | Value | ) |
[Physx Only] Lock rotation about the Y-axis
| void SetbLockYTranslation | ( | bool | Value | ) |
[Physx Only] Lock translation along the Y-axis
| void SetbLockZRotation | ( | bool | Value | ) |
[Physx Only] Lock rotation about the Z-axis
| void SetbLockZTranslation | ( | bool | Value | ) |
[Physx Only] Lock translation along the Z-axis
| void SetbNotifyRigidBodyCollision | ( | bool | Value | ) |
Should 'Hit' events fire when this object collides during physics simulation.
| void SetbOneWayInteraction | ( | bool | Value | ) |
If set to true, this body will treat bodies that do not have the flag set as having infinite mass.
| void SetbOverrideMass | ( | bool | Value | ) |
If true, mass will not be automatically computed and you must set it directly.
| void SetbOverrideMaxAngularVelocity | ( | bool | Value | ) |
Override the default max angular velocity.
| void SetbOverrideMaxDepenetrationVelocity | ( | bool | Value | ) |
Whether this body instance has its own custom MaxDepenetrationVelocity.
| void SetbOverrideSolverAsyncDeltaTime | ( | bool | Value | ) |
Set the desired delta time for the body. *.
| void SetbOverrideWalkableSlopeOnInstance | ( | bool | Value | ) |
Whether this instance of the object has its own custom walkable slope override setting.
| void SetbSimulatePhysics | ( | bool | Value | ) |
If true, this body will use simulation. If false, will be 'fixed' (ie kinematic) and move where it is told. For a Skeletal Mesh Component, simulating requires a physics asset setup and assigned on the SkeletalMesh asset. For a Static Mesh Component, simulating requires simple collision to be setup on the StaticMesh asset.
| void SetbSmoothEdgeCollisions | ( | bool | Value | ) |
Remove unnecessary edge collisions to allow smooth sliding over surfaces composed of multiple actors/components. This is fairly expensive and should only be enabled on hero objects.
| void SetbStartAwake | ( | bool | Value | ) |
If object should start awake, or if it should initially be sleeping.
| void SetbUpdateKinematicFromSimulation | ( | bool | Value | ) |
When kinematic, whether the actor transform should be updated as a result of movement in the simulation, rather than immediately whenever a target transform is set.
| void SetbUpdateMassWhenScaleChanges | ( | bool | Value | ) |
If true, it will update mass when scale change *.
| void SetbUseCCD | ( | bool | Value | ) |
If true Continuous Collision Detection (CCD) will be used for this component.
| void SetbUseMACD | ( | bool | Value | ) |
[EXPERIMENTAL] If true Motion-Aware Collision Detection (MACD) will be used for this component
| void SetUseCCD | ( | bool | bInUseCCD | ) |
| void UnWeld | ( | FBodyInstance & | TheirBI | ) |
| bool Weld | ( | FBodyInstance & | TheirBody, |
| FTransform | TheirTM ) |
| float32 AngularDamping |
'Drag' force added to reduce angular movement
| bool bAutoWeld |
| bool bEnableGravity |
| bool bGenerateWakeEvents |
| bool bIgnoreAnalyticCollisions |
| bool bInertiaConditioning |
| bool bNotifyRigidBodyCollision |
| const UBodySetup BodySetup |
| bool bOneWayInteraction |
| bool bOverrideSolverAsyncDeltaTime |
| bool bSimulatePhysics |
| bool bSmoothEdgeCollisions |
| bool bStartAwake |
| bool bUpdateKinematicFromSimulation |
| bool bUpdateMassWhenScaleChanges |
| bool bUseCCD |
| ECollisionEnabled CollisionEnabled |
Type of collision enabled.
No Collision : Will not create any representation in the physics engine. Cannot be used for spatial queries (raycasts, sweeps, overlaps) or simulation (rigid body, constraints). Best performance possible (especially for moving objects) Query Only : Only used for spatial queries (raycasts, sweeps, and overlaps). Cannot be used for simulation (rigid body, constraints). Useful for character movement and things that do not need physical simulation. Performance gains by keeping data out of simulation tree. Physics Only : Only used only for physics simulation (rigid body, constraints). Cannot be used for spatial queries (raycasts, sweeps, overlaps). Useful for jiggly bits on characters that do not need per bone detection. Performance gains by keeping data out of query tree Collision Enabled : Can be used for both spatial queries (raycasts, sweeps, overlaps) and simulation (rigid body, constraints).
| FName CollisionProfileName |
Collision Profile Name *.
| FCollisionResponse CollisionResponses |
Custom Channels for Responses.
| FVector COMNudge |
User specified offset for the center of mass of this object, from the calculated location.
| FVector CustomDOFPlaneNormal |
Locks physical movement along a custom plane for a given normal.
| float32 CustomSleepThresholdMultiplier |
If the SleepFamily is set to custom, multiply the natural sleep threshold by this amount. A higher number will cause the body to sleep sooner.
| EDOFMode DOFMode |
[Physx Only] Locks physical movement along specified axis.
| FVector InertiaTensorScale |
Per-instance scaling of inertia (bigger number means it'll be harder to rotate).
| float32 LinearDamping |
'Drag' force added to reduce linear movement
| float32 MassInKgOverride |
Mass of the body in KG. By default we compute this based on physical material and mass scale. @see bOverrideMass to set this directly.
| float32 MassScale |
Per-instance scaling of mass.
| float32 MaxAngularVelocity |
The maximum angular velocity for this instance [degrees/s].
| float32 MaxDepenetrationVelocity |
The maximum velocity used to depenetrate this object from others when spawned or teleported with initial overlaps (does not affect overlaps as a result of normal movement). A value of zero will allow objects that are spawned overlapping to go to sleep without moving rather than pop out of each other. E.g., use zero if you spawn dynamic rocks partially embedded in the ground and want them to be interactive but not pop out of the ground when touched. A negative value is equivalent to bOverrideMaxDepenetrationVelocity = false, meaning use the project setting. This overrides the CollisionInitialOverlapDepenetrationVelocity project setting on a per-body basis (and not the MaxDepenetrationVelocity solver setting that will be deprecated).
| ECollisionChannel ObjectType |
Enum indicating what type of object this should be considered as when it moves.
| UPhysicalMaterial PhysMaterialOverride |
Allows you to override the PhysicalMaterial to use for simple collision on this body.
| uint8 PositionSolverIterationCount |
[PhysX Only] This physics body's solver iteration count for position. Increasing this will be more CPU intensive, but better stabilized.
| ESleepFamily SleepFamily |
The set of values used in considering when put this body to sleep.
| float32 SolverAsyncDeltaTime |
Override value for physics solver async delta time. With multiple actors specifying this, the solver will use the smallest delta time *.
| float32 StabilizationThresholdMultiplier |
Stabilization factor for this body if Physics stabilization is enabled. A higher number will cause more aggressive stabilization at the risk of loss of momentum at low speeds. A value of 0 will disable stabilization for this body.
| uint8 VelocitySolverIterationCount |
[PhysX Only] This physics body's solver iteration count for velocity. Increasing this will be more CPU intensive, but better stabilized.
| FWalkableSlopeOverride WalkableSlopeOverride |
Custom walkable slope override setting for this instance. @see GetWalkableSlopeOverride(), SetWalkableSlopeOverride().