Reorganize Physics Settings
This commit is contained in:
@@ -16,82 +16,81 @@ public:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default gravity force value (in cm^2/s).
|
/// The default gravity force value (in cm^2/s).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(0), DefaultValue(typeof(Vector3), \"0,-981.0,0\"), EditorDisplay(\"Simulation\")")
|
API_FIELD(Attributes="EditorOrder(0), EditorDisplay(\"Simulation\")")
|
||||||
Vector3 DefaultGravity = Vector3(0, -981.0f, 0);
|
Vector3 DefaultGravity = Vector3(0, -981.0f, 0);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// If enabled, any Raycast or other scene query that intersects with a Collider marked as a Trigger will returns with a hit. Individual raycasts can override this behavior.
|
|
||||||
/// </summary>
|
|
||||||
API_FIELD(Attributes="EditorOrder(10), DefaultValue(true), EditorDisplay(\"Framerate\")")
|
|
||||||
bool QueriesHitTriggers = true;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Triangles from triangle meshes (CSG) with an area less than or equal to this value will be removed from physics collision data. Set to less than or equal 0 to disable.
|
|
||||||
/// </summary>
|
|
||||||
API_FIELD(Attributes="EditorOrder(20), DefaultValue(5.0f), EditorDisplay(\"Simulation\")")
|
|
||||||
float TriangleMeshTriangleMinAreaThreshold = 5.0f;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Minimum relative velocity required for an object to bounce. A typical value for simulation stability is about 0.2 * gravity
|
/// Minimum relative velocity required for an object to bounce. A typical value for simulation stability is about 0.2 * gravity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(30), DefaultValue(200.0f), EditorDisplay(\"Simulation\")")
|
API_FIELD(Attributes="EditorOrder(30), EditorDisplay(\"Simulation\")")
|
||||||
float BounceThresholdVelocity = 200.0f;
|
float BounceThresholdVelocity = 200.0f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default friction combine mode, controls how friction is computed for multiple materials.
|
/// Default friction combine mode, controls how friction is computed for multiple materials.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(40), DefaultValue(PhysicsCombineMode.Average), EditorDisplay(\"Simulation\")")
|
API_FIELD(Attributes="EditorOrder(40), EditorDisplay(\"Simulation\")")
|
||||||
PhysicsCombineMode FrictionCombineMode = PhysicsCombineMode::Average;
|
PhysicsCombineMode FrictionCombineMode = PhysicsCombineMode::Average;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default restitution combine mode, controls how restitution is computed for multiple materials.
|
/// Default restitution combine mode, controls how restitution is computed for multiple materials.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(40), DefaultValue(PhysicsCombineMode.Average), EditorDisplay(\"Simulation\")")
|
API_FIELD(Attributes="EditorOrder(40), EditorDisplay(\"Simulation\")")
|
||||||
PhysicsCombineMode RestitutionCombineMode = PhysicsCombineMode::Average;
|
PhysicsCombineMode RestitutionCombineMode = PhysicsCombineMode::Average;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If true CCD will be ignored. This is an optimization when CCD is never used which removes the need for physx to check it internally.
|
/// If true CCD will be ignored. This is an optimization when CCD is never used which removes the need for physics to check it internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(70), DefaultValue(false), EditorDisplay(\"Simulation\")")
|
API_FIELD(Attributes="EditorOrder(70), EditorDisplay(\"Simulation\")")
|
||||||
bool DisableCCD = false;
|
bool DisableCCD = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables adaptive forces to accelerate convergence of the solver. Can improve physics simulation performance but lead to artifacts.
|
/// Enables adaptive forces to accelerate convergence of the solver. Can improve physics simulation performance but lead to artifacts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(80), DefaultValue(false), EditorDisplay(\"Simulation\")")
|
API_FIELD(Attributes="EditorOrder(80), EditorDisplay(\"Simulation\")")
|
||||||
bool EnableAdaptiveForce = false;
|
bool EnableAdaptiveForce = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum allowed delta time (in seconds) for the physics simulation step.
|
/// The maximum allowed delta time (in seconds) for the physics simulation step.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(1000), DefaultValue(1.0f / 10.0f), EditorDisplay(\"Framerate\")")
|
API_FIELD(Attributes="EditorOrder(1000), EditorDisplay(\"Framerate\")")
|
||||||
float MaxDeltaTime = 1.0f / 10.0f;
|
float MaxDeltaTime = 0.1f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to substep the physics simulation.
|
/// Whether to substep the physics simulation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(1005), DefaultValue(false), EditorDisplay(\"Framerate\")")
|
API_FIELD(Attributes="EditorOrder(1005), EditorDisplay(\"Framerate\")")
|
||||||
bool EnableSubstepping = false;
|
bool EnableSubstepping = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delta time (in seconds) for an individual simulation substep.
|
/// Delta time (in seconds) for an individual simulation substep.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(1010), DefaultValue(1.0f / 120.0f), EditorDisplay(\"Framerate\")")
|
API_FIELD(Attributes="EditorOrder(1010), EditorDisplay(\"Framerate\")")
|
||||||
float SubstepDeltaTime = 1.0f / 120.0f;
|
float SubstepDeltaTime = 0.00833333333f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The maximum number of substeps for physics simulation.
|
/// The maximum number of substeps for physics simulation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(1020), DefaultValue(5), EditorDisplay(\"Framerate\")")
|
API_FIELD(Attributes="EditorOrder(1020), EditorDisplay(\"Framerate\")")
|
||||||
int32 MaxSubsteps = 5;
|
int32 MaxSubsteps = 5;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables support for cooking physical collision shapes geometry at runtime. Use it to enable generating runtime terrain collision or convex mesh colliders.
|
/// Enables support for cooking physical collision shapes geometry at runtime. Use it to enable generating runtime terrain collision or convex mesh colliders.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
API_FIELD(Attributes="EditorOrder(1100), DefaultValue(false), EditorDisplay(\"Other\")")
|
API_FIELD(Attributes="EditorOrder(1100), EditorDisplay(\"Other\")")
|
||||||
bool SupportCookingAtRuntime = false;
|
bool SupportCookingAtRuntime = false;
|
||||||
|
|
||||||
public:
|
/// <summary>
|
||||||
|
/// Triangles from triangle meshes (CSG) with an area less than or equal to this value will be removed from physics collision data. Set to less than or equal 0 to disable.
|
||||||
|
/// </summary>
|
||||||
|
API_FIELD(Attributes="EditorOrder(1110), EditorDisplay(\"Other\")")
|
||||||
|
float TriangleMeshTriangleMinAreaThreshold = 5.0f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If enabled, any Raycast or other scene query that intersects with a Collider marked as a Trigger will returns with a hit. Individual raycasts can override this behavior.
|
||||||
|
/// </summary>
|
||||||
|
API_FIELD(Attributes="EditorOrder(1200), EditorDisplay(\"Other\")")
|
||||||
|
bool QueriesHitTriggers = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The collision layers masks. Used to define layer-based collision detection.
|
/// The collision layers masks. Used to define layer-based collision detection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user