unreal.SimSpaceSettings

class unreal.SimSpaceSettings(master_alpha=0.0, velocity_scale_z=1.0, max_linear_velocity=10000.0, max_angular_velocity=10000.0, max_linear_acceleration=10000.0, max_angular_acceleration=10000.0, external_linear_drag_v=[0.0, 0.0, 0.0], external_linear_velocity=[0.0, 0.0, 0.0], external_angular_velocity=[0.0, 0.0, 0.0])

Bases: unreal.StructBase

Settings for the system which passes motion of the simulation’s space into the simulation. This allows the simulation to pass a fraction of the world space motion onto the bodies which allows Bone-Space and Component-Space simulations to react to world-space movement in a controllable way.

C++ Source:

  • Module: AnimGraphRuntime

  • File: AnimNode_RigidBody.h

Editor Properties: (see get_editor_property/set_editor_property)

  • external_angular_velocity (Vector): [Read-Write] External Angular Velocity: Additional angular velocity that is added to the component angular velocity. This can be used to make the simulation act as if the actor is rotating even when it is not. E.g., to apply physics to a character on a podium as the camera rotates around it, to emulate the podium itself rotating. Vector is in world space. Units are rad/s.

  • external_linear_drag (float): [Read-Write] External Linear Drag deprecated: ExternalLinearDrag is deprecated. Please use ExternalLinearDragV instead.

  • external_linear_drag_v (Vector): [Read-Write] External Linear Drag V: Additional linear drag applied to every body in addition to linear drag specified on them in the physics asset. When combined with ExternalLinearVelocity, this can be used to add a temporary wind-blown effect without having to tune linear drag on all the bodies in the physics asset. The result is that each body has a force equal to -ExternalLinearDragV * ExternalLinearVelocity applied to it, in additional to all other forces. The vector is in simulation local space.

  • external_linear_velocity (Vector): [Read-Write] External Linear Velocity: Additional velocity that is added to the component velocity so the simulation acts as if the actor is moving at speed, even when stationary. Vector is in world space. Units are cm/s. Could be used for a wind effects etc. Typical values are similar to the velocity of the object or effect, and usually around or less than 1000 for characters/wind.

  • master_alpha (float): [Read-Write] Master Alpha: Global multipler on the effects of simulation space movement. Must be in range [0, 1]. If MasterAlpha = 0.0, the system is disabled and the simulation will be fully local (i.e., world-space actor movement and rotation does not affect the simulation). When MasterAlpha = 1.0 the simulation effectively acts as a world-space sim, but with the ability to apply limits using the other parameters.

  • max_angular_acceleration (float): [Read-Write] Max Angular Acceleration: A clamp on the effective world-space angular accleration that is passed to the simulation. Units are radian/s/s. The default value effectively means “unlimited”. This has a similar effect to MaxAngularVelocity, except that it is related to the flying out of bodies when the rotation speed suddenly changes. Typical limist for a character might be around 100.

  • max_angular_velocity (float): [Read-Write] Max Angular Velocity: A clamp on the effective world-space angular velocity that is passed to the simulation. Units are radian/s, so a value of about 6.0 is one rotation per second. The default value effectively means “unlimited”. You would reduce this (and MaxAngularAcceleration) to limit how much bodies “fly out” when the actor spins on the spot. This is especially useful if you have characters than can rotate very quickly and you would probably want values around or less than 10 in this case.

  • max_linear_acceleration (float): [Read-Write] Max Linear Acceleration: A clamp on the effective world-space acceleration that is passed to the simulation. Units are cm/s/s. The default value effectively means “unlimited”. This property is used to stop the bodies of the simulation flying out when suddenly changing linear speed. It is useful when you have characters than can changes from stationary to running very quickly such as in an FPS. A common value for a character might be in the few hundreds.

  • max_linear_velocity (float): [Read-Write] Max Linear Velocity: A clamp on the effective world-space velocity that is passed to the simulation. Units are cm/s. The default value effectively means “unlimited”. It is not usually required to change this but you would reduce this to limit the effects of drag on the bodies in the simulation (if you have bodies that have LinearDrag set to non-zero in the physics asset). Expected values in this case would be somewhat less than the usual velocities of your object which is commonly a few hundred for a character.

  • velocity_scale_z (float): [Read-Write] Velocity Scale Z: Multiplier on the Z-component of velocity and acceleration that is passed to the simulation. Usually from 0.0 to 1.0 to reduce the effects of jumping and crouching on the simulation, but it can be higher than 1.0 if you need to exaggerate this motion for some reason.

property external_angular_velocity

[Read-Write] External Angular Velocity: Additional angular velocity that is added to the component angular velocity. This can be used to make the simulation act as if the actor is rotating even when it is not. E.g., to apply physics to a character on a podium as the camera rotates around it, to emulate the podium itself rotating. Vector is in world space. Units are rad/s.

Type

(Vector)

property external_linear_drag

[Read-Write] External Linear Drag deprecated: ExternalLinearDrag is deprecated. Please use ExternalLinearDragV instead.

Type

(float)

property external_linear_drag_v

[Read-Write] External Linear Drag V: Additional linear drag applied to every body in addition to linear drag specified on them in the physics asset. When combined with ExternalLinearVelocity, this can be used to add a temporary wind-blown effect without having to tune linear drag on all the bodies in the physics asset. The result is that each body has a force equal to -ExternalLinearDragV * ExternalLinearVelocity applied to it, in additional to all other forces. The vector is in simulation local space.

Type

(Vector)

property external_linear_velocity

[Read-Write] External Linear Velocity: Additional velocity that is added to the component velocity so the simulation acts as if the actor is moving at speed, even when stationary. Vector is in world space. Units are cm/s. Could be used for a wind effects etc. Typical values are similar to the velocity of the object or effect, and usually around or less than 1000 for characters/wind.

Type

(Vector)

property master_alpha

[Read-Write] Master Alpha: Global multipler on the effects of simulation space movement. Must be in range [0, 1]. If MasterAlpha = 0.0, the system is disabled and the simulation will be fully local (i.e., world-space actor movement and rotation does not affect the simulation). When MasterAlpha = 1.0 the simulation effectively acts as a world-space sim, but with the ability to apply limits using the other parameters.

Type

(float)

property max_angular_acceleration

[Read-Write] Max Angular Acceleration: A clamp on the effective world-space angular accleration that is passed to the simulation. Units are radian/s/s. The default value effectively means “unlimited”. This has a similar effect to MaxAngularVelocity, except that it is related to the flying out of bodies when the rotation speed suddenly changes. Typical limist for a character might be around 100.

Type

(float)

property max_angular_velocity

[Read-Write] Max Angular Velocity: A clamp on the effective world-space angular velocity that is passed to the simulation. Units are radian/s, so a value of about 6.0 is one rotation per second. The default value effectively means “unlimited”. You would reduce this (and MaxAngularAcceleration) to limit how much bodies “fly out” when the actor spins on the spot. This is especially useful if you have characters than can rotate very quickly and you would probably want values around or less than 10 in this case.

Type

(float)

property max_linear_acceleration

[Read-Write] Max Linear Acceleration: A clamp on the effective world-space acceleration that is passed to the simulation. Units are cm/s/s. The default value effectively means “unlimited”. This property is used to stop the bodies of the simulation flying out when suddenly changing linear speed. It is useful when you have characters than can changes from stationary to running very quickly such as in an FPS. A common value for a character might be in the few hundreds.

Type

(float)

property max_linear_velocity

[Read-Write] Max Linear Velocity: A clamp on the effective world-space velocity that is passed to the simulation. Units are cm/s. The default value effectively means “unlimited”. It is not usually required to change this but you would reduce this to limit the effects of drag on the bodies in the simulation (if you have bodies that have LinearDrag set to non-zero in the physics asset). Expected values in this case would be somewhat less than the usual velocities of your object which is commonly a few hundred for a character.

Type

(float)

property velocity_scale_z

[Read-Write] Velocity Scale Z: Multiplier on the Z-component of velocity and acceleration that is passed to the simulation. Usually from 0.0 to 1.0 to reduce the effects of jumping and crouching on the simulation, but it can be higher than 1.0 if you need to exaggerate this motion for some reason.

Type

(float)