Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMI_physics_body: Rename rigid to dynamic, remove character/vehicle #183

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions extensions/2.0/OMI_physics_body/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,30 +107,20 @@ Here is a table listing the mapping between the `OMI_physics_body` type and the
| --------- | --------------------- | ------------- | ---------------- | -------------------------------------- |
| Static | Collider | StaticBody | StaticBody3D | WorldStatic, Simulate Physics = false |
| Kinematic | Rigidbody.isKinematic | KinematicBody | AnimatableBody3D | WorldDynamic, Simulate Physics = false |
| Character | Rigidbody.isKinematic | KinematicBody | CharacterBody3D | Pawn, Simulate Physics = false |
| Rigid | Rigidbody | RigidBody | RigidBody3D | PhysicsBody, Simulate Physics = true |
| Vehicle | Rigidbody | VehicleBody | VehicleBody3D | Vehicle, Simulate Physics = true |
| Dynamic | Rigidbody | RigidBody | RigidBody3D | PhysicsBody, Simulate Physics = true |
| Trigger | Collider.isTrigger | Area | Area3D | Generate Overlap Events = true |

#### Static

Static bodies can be collided with, but do not move. They are usually used for level geometry.
Static bodies can be collided with, but do not have simulated movement. They are usually used for level geometry.

#### Kinematic

Kinematic bodies collide with other bodies, and can be moved using scripts or animations. They can be used for moving platforms.
Kinematic bodies can be collided with, and can be moved using scripts or animations. They can be used for moving platforms.

#### Character
#### Dynamic

Character bodies are like kinematic bodies, except are designed for characters. If an engine does not have a dedicated character type, treat this as kinematic instead.

#### Rigid

Rigid bodies collide with other bodies, and move around on their own in the physics simulation. They are affected by gravity. They can be used for props that move around in the world.

#### Vehicle

Vehicle bodies are like rigid bodies, except are designed for vehicles. If an engine does not have a dedicated vehicle type, treat this as rigid instead.
Dynamic bodies are bodies simulated with [rigid body dynamics](https://en.wikipedia.org/wiki/Rigid_body_dynamics). They collide with other bodies, and move around on their own in the physics simulation. They are affected by gravity. They can be used for props that move around in the world.

#### Trigger

Expand All @@ -156,7 +146,7 @@ This property is useful when converting assets with a center of mass, but when c

### Inertia Tensor

The `"inertiaTensor"` property is an array of 9 numbers that defines the inertia tensor 3x3 matrix of the body in kilogram meter squared (kg⋅m²). We specify "tensor" in the name because this defines inertia in multiple directions and is different from linear momentum inertia. Only "rigid" and "vehicle" body types can make use of inertia. If zero or not specified, the inertia should be automatically calculated by the physics engine.
The `"inertiaTensor"` property is an array of 9 numbers that defines the inertia tensor 3x3 matrix of the body in kilogram meter squared (kg⋅m²). We specify "tensor" in the name because this defines inertia in multiple directions and is different from linear momentum inertia. Only the "dynamic" body type can make use of inertia. If zero or not specified, the inertia should be automatically calculated by the physics engine.

The inertia tensor matrix is a symmetric matrix. The inertia matrix represents the mass distribution of the body and determines how hard the body is to rotate. The values on the diagonal represent the inertia around the 3 principle axes (X, Y, Z), while the values not on the diagonal represent the 3 coupling values between the axes (XY, XZ, YZ). For more information, refer to the Wikipedia article.

Expand Down
10 changes: 5 additions & 5 deletions extensions/2.0/OMI_physics_body/examples/complex/ball_pit.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@
"extensions": {
"OMI_physics_body": {
"mass": 1,
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball1",
Expand Down Expand Up @@ -1476,7 +1476,7 @@
"extensions": {
"OMI_physics_body": {
"mass": 1,
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball2",
Expand Down Expand Up @@ -1509,7 +1509,7 @@
"extensions": {
"OMI_physics_body": {
"mass": 1,
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball3",
Expand Down Expand Up @@ -1542,7 +1542,7 @@
"extensions": {
"OMI_physics_body": {
"mass": 1,
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball4",
Expand Down Expand Up @@ -1575,7 +1575,7 @@
"extensions": {
"OMI_physics_body": {
"mass": 1,
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"OMI_physics_body": {
"angularVelocity": [4, 5, 6],
"linearVelocity": [1, 2, 3],
"type": "rigid"
"type": "dynamic"
}
},
"name": "RigidWithVelocity"
"name": "DynamicWithVelocity"
},
{
"extensions": {
Expand All @@ -42,9 +42,5 @@
}
],
"scene": 0,
"scenes": [
{
"nodes": [0]
}
]
"scenes": [{ "nodes": [0] }]
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"enum": [
"static",
"kinematic",
"character",
"rigid",
"vehicle",
"dynamic",
"trigger"
]
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/2.0/OMI_physics_joint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This example defines 2 rigid bodies that are connected with a joint that constra
{
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "BodyA",
Expand All @@ -72,7 +72,7 @@ This example defines 2 rigid bodies that are connected with a joint that constra
{
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "BodyB",
Expand Down
6 changes: 3 additions & 3 deletions extensions/2.0/OMI_physics_joint/examples/hanging_rope.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentTop",
Expand Down Expand Up @@ -762,7 +762,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentMiddle",
Expand Down Expand Up @@ -823,7 +823,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentBottom",
Expand Down
6 changes: 3 additions & 3 deletions extensions/2.0/OMI_physics_joint/examples/pendulum_balls.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball1",
Expand Down Expand Up @@ -1196,7 +1196,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball2",
Expand Down Expand Up @@ -1269,7 +1269,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball3",
Expand Down
10 changes: 5 additions & 5 deletions extensions/2.0/OMI_physics_joint/examples/rope_railing.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentLeft",
Expand Down Expand Up @@ -1194,7 +1194,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentLeftMiddle",
Expand Down Expand Up @@ -1255,7 +1255,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentMiddle",
Expand Down Expand Up @@ -1310,7 +1310,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentRightMiddle",
Expand Down Expand Up @@ -1371,7 +1371,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "RopeSegmentRight",
Expand Down
4 changes: 2 additions & 2 deletions extensions/2.0/OMI_physics_joint/examples/simple_joint.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
"children": [4],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "BodyA",
Expand All @@ -511,7 +511,7 @@
"children": [6],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "BodyB",
Expand Down
2 changes: 1 addition & 1 deletion extensions/2.0/OMI_physics_joint/examples/slider_ball.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
0.00000000000208164995657567,
0.00000000000208164995657567
],
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "Ball",
Expand Down
4 changes: 2 additions & 2 deletions extensions/2.0/OMI_physics_joint/examples/weld_joint.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
"children": [2],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "BodyA",
Expand Down Expand Up @@ -534,7 +534,7 @@
],
"extensions": {
"OMI_physics_body": {
"type": "rigid"
"type": "dynamic"
}
},
"name": "BodyB",
Expand Down