跳转到内容

Physics3DWorldConfig

此内容尚不支持你的语言。

Defined in: sdk/src/physics3d/worldConfig.ts:12

bounceThreshold: number

Defined in: sdk/src/physics3d/worldConfig.ts:31

m/s; slower impacts do not bounce. 0 = the backend’s own (Jolt 1 / PhysX 2).


collisionSteps: number

Defined in: sdk/src/physics3d/worldConfig.ts:22

Collision passes per fixed step: more keeps fast bodies from tunnelling, at their cost.


enableSleep: boolean

Defined in: sdk/src/physics3d/worldConfig.ts:29


gravity: Vec3

Defined in: sdk/src/physics3d/worldConfig.ts:20

Metres per second squared, whatever the scene unit is.


maxBodies: number

Defined in: sdk/src/physics3d/worldConfig.ts:24

Bodies the world is sized for; the solver refuses one past it.


positionIterations: number

Defined in: sdk/src/physics3d/worldConfig.ts:28

0 = the backend’s own (Jolt 2 / PhysX 6).


unitsPerMeter: number

Defined in: sdk/src/physics3d/worldConfig.ts:18

Scene units in one metre. 100 (the default): a unit is a centimetre. 1: a unit is a metre, as glTF and most imported 3D scenes are. The solver works in metres, so this is what makes a 1.8-unit character in a metre scene 1.8 m tall rather than 1.8 cm, and keeps its gravity at 9.81 m/s² rather than 9.81 units/s².


velocityIterations: number

Defined in: sdk/src/physics3d/worldConfig.ts:26

0 = the backend’s own (Jolt 10 / PhysX 1).