FSimulation

Owns all the data associated with the simulation. Can be considered a single scene or world

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Physics/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.h

Include

#include "Physics/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.h"

Syntax

struct FSimulation

Remarks

Owns all the data associated with the simulation. Can be considered a single scene or world

Constructors

Name Description

Public function

FSimulation()

Destructors

Name Description

Public function

~FSimulation()

Functions

Name Description

Public function

void

 

AddToCollidingPairs

(
    FActorHandle * ActorHandle
)

Set up potential collisions between the actor and all other dynamic actors

Public function

FActorHandle ...

 

CreateActor

(
    EActorType ActorType,
    FBodyInstance * BodyInstance,
    const FTransform & Transform
)

Public function

FActorHandle ...

 

CreateDynamicActor

(
    FBodyInstance * BodyInstance,
    const FTransform & Transform
)

Create a dynamic body and add it to the simulation

Public function

FJointHandle ...

 

CreateJoint

(
    FConstraintInstance * Constrain...,
    FActorHandle * Body1,
    FActorHandle * Body2
)

Create a physical joint and add it to the simulation

Public function

FActorHandle ...

 

CreateKinematicActor

(
    FBodyInstance * BodyInstance,
    const FTransform & Transform
)

Create a kinematic body and add it to the simulation

Public function

FActorHandle ...

 

CreateStaticActor

(
    FBodyInstance * BodyInstance
)

Create a static body and add it to the simulation

Public function

void

 

DestroyActor

(
    FActorHandle * ActorHandle
)

Public function

void

 

DestroyJoint

(
    FJointHandle * JointHandle
)

Public function Const

const FActor ...

 

GetActorHandle

(
    int32 ActorHandleIndex
)

Public function

FActorHandle ...

 

GetActorHandle

(
    int32 ActorHandleIndex
)

Public function

void

 

InitSimulationSpace

(
    const FTransform & Transform
)

Public function Const

int32

 

NumActors()

Public function

void

 

SetIgnoreCollisionActors

(
    const TArray < FActorHandle * > ...
)

Set bodies that require no collision

Public function

void

 

SetIgnoreCollisionPairTable

(
    const TArray < FIgnorePair >& InIgn...
)

Set pair of bodies to ignore collision for

Public function

void

 

SetNumActiveBodies

(
    int32 NumActiveBodies
)

Sets the number of active bodies. This number is reset any time a new simulated body is created

Public function

void

 

SetSimulationSpaceSettings

(
    const FReal MasterAlpha,
    const FVector & ExternalLinearEther...
)

Public function

void

 

SetSolverIterations

(
    const FReal FixedDt,
    const int32 SolverIts,
    const int32 JointIts,
    const int32 CollisionIts,
    const int32 SolverPushOutIts,
    const int32 JointPushOutIts,
    const int32 CollisionPushOutIts
)

Set new iteration counts. A negative value with leave that iteration count unchanged

Public function

void

 

Simulate

(
    float DeltaTime,
    float MaxStepTime,
    int32 MaxSubSteps,
    const FVector & InGravity
)

Advance the simulation by DeltaTime

Public function

void

 

Simulate_AssumesLocked

(
    float DeltaTime,
    float MaxStepTime,
    int32 MaxSubSteps,
    const FVector & InGravity
)

Public function

void

 

UpdateSimulationSpace

(
    const FTransform & Transform,
    const FVector & LinearVel,
    const FVector & AngularVel,
    const FVector & LinearAcc,
    const FVector & AngularAcc
)

Classes

Name

Description

Public struct

FIgnorePair

An array of actors to ignore.

Public struct

FImplementation

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback