diff --git a/extensions/2.0/OMI_physics_joint/README.md b/extensions/2.0/OMI_physics_joint/README.md index 5d34d72..ef5294d 100644 --- a/extensions/2.0/OMI_physics_joint/README.md +++ b/extensions/2.0/OMI_physics_joint/README.md @@ -2,7 +2,7 @@ ## Contributors -* Aaron Franke, The Mirror Megaverse Inc. +- Aaron Franke, Godot Engine. ## Status @@ -16,180 +16,250 @@ Depends on the `OMI_physics_body` spec, which depends on the `OMI_physics_shape` ## Overview -This extension allows defining a glTF node as a physics joint for constraining dynamic bodies. +This extension allows defining a glTF node as a physics joint for constraining the relative motion of dynamic bodies, or a dynamic body to a non-dynamic body. -Each physics joint node is a separate node that references the two bodies it joints together. At least one of the bodies must be a dynamic body (`OMI_physics_body` motion type "dynamic") for the joint to function. One or zero of the connected nodes may be a solid body that joints cannot move (`OMI_physics_body` motion type "static" or "kinematic"). A joint cannot be connected to a trigger body, and cannot be connected to a non-`OMI_physics_body` glTF node. +Each physics joint node is a glTF node as a descendant of one physics body that references another glTF node, joining them together. The joint node must have a dynamic body ancestor node (`OMI_physics_body` motion type "dynamic") for the joint to function. A joint must be on its own glTF node, it should not be on the same node as a mesh, camera, light, physics body, physics shape, etc. The joint node is connected to another glTF node, `"connectedNode"`, which must be a descendant of some kind of physics body node (`OMI_physics_body` motion of any type). The transforms of the joint node and its connected node relative to their respective physics bodies determine the joint's connection point and orientation. -Each physics joint node must reference one or more joint constraints defined in the document-level joint constraints array. +Each physics joint node must reference joint settings defined in the document-level joint `"physicsJoints"` array. Each joint settings object contains an array of joint limits and an array of joint drives, which define the behavior of the joint. The parameters of all joint limits define how the joint constrains the relative motion of the connected nodes. The parameters of all joint drives define how the joint applies forces to the connected nodes to drive them to a desired relative target, which includes forces that make the drive act as a motor or spring. -A joint should be on its own glTF node, it should not be on the same node as a mesh, camera, light, physics body, physics shape, etc. +## glTF Schema Updates + +This extension consists of five new data structures for defining physics joints. A glTF file with physics joints should have a document-level `"OMI_physics_joint"` object added to the document `"extensions"` which contains an array of physics joint settings. Each joint settings object has an array of joint limits, and an array of joint drives. Then, the key `"OMI_physics_joint"` can be added to the node-level `"extensions"` of a glTF node to define that node is a physics joint, as long as the node is a descendant of a physics body node. Each physics joint node references a settings object the document-level constraints array by index, and each joint node also references another glTF node to which it is connected. + +The extension must also be added to the glTF's `extensionsUsed` array and because it is optional, it does not need to be added to the `extensionsRequired` array. + +## Joint Node + +If a node has the `"OMI_physics_joint"` extension defined, it is a physics joint that constrains the relative motion of two physics bodies at their attachment point glTF nodes. The joint settings and the connected node must be defined. + +| | Type | Description | Default value | +| ------------------- | --------- | --------------------------------------------------------------------- | -------------------- | +| **joint** | `integer` | The index of the joint settings in the top level physicsJoints array. | Required, no default | +| **connectedNode** | `integer` | The index of the node to which this is connected. | Required, no default | +| **enableCollision** | `boolean` | If true, allow the connected objects to collide. | false | + +### Joint + +The `"joint"` property is an integer index that references a joint in the document-level physicsJoints array in the `OMI_physics_body` extension. This property is required and has no default value. + +The document-level joint object holds parameters that define the behavior of the joint, including constraints, limits, and drives/motors. This allows the limits and drives utilized by the joint to be defined in a shareable manner. + +### Connected Node + +The `"connectedNode"` property is an integer index that references another glTF node in the scene. This property is required and has no default value. + +The connected node must be a descendant of some kind of physics body node (`OMI_physics_body` motion of any type). The transforms of the joint node and its connected node relative to their respective physics bodies determine the joint's connection point and orientation, known as the attachment frame. Changing the attachment frame at runtime is not expected to be supported. When calculating physics interactions, the joint should attempt to keep the joint and its connected node at the same global position and orientation, within the range allowed by the joint's limits. + +### Enable Collision + +The `"enableCollision"` property is a boolean value. If true, allow the connected objects to collide. Connected objects do not collide with each other by default. + +## Joint Settings + +The top-level extension object contains an array of joint settings objects, `"physicsJoints"`, which are referenced by the joint nodes. Each object contains an array of joint limits and an array of joint drives, which define the behavior of the joint. + +| | Type | Description | Default value | +| ---------- | ------- | ----------------------------------------------------------------------------------- | ------------- | +| **limits** | `array` | The set of limits which constrain relative motion between a pair of nodes. | [] | +| **drives** | `array` | The set of drives applying forces to this joint. Drives include motors and springs. | [] | + +Joint settings objects may have zero or more joint limits and zero or more joint drives. At least one array should have contents, or the joint settings object is useless within this extension. See "Joint Limits" and "Joint Drives" below for more information about the properties of the objects in each array. + +## Joint Limits + +Joint limits, also known as joint constraints, allow restricting the relative motion of two glTF nodes connected by a joint. Limits can be set on the joint's position, rotation, or both. At least one of the linear or angular axes must be set, or the limit is useless within this extension. At least one of the `"min"` or `"max"` must be set, or the limit is useless within this extension. + +| | Type | Description | Default value | +| --------------- | ----------- | ------------------------------------------------------------------------------------- | ------------- | +| **linearAxes** | `integer[]` | The indices of the linear axes which are limited by this constraint. | [] | +| **angularAxes** | `integer[]` | The indices of the angular axes which are limited by this constraint. | [] | +| **min** | `number` | The minimum of the allowed range of relative distance in meters, or angle in radians. | -Infinity | +| **max** | `number` | The maximum of the allowed range of relative distance in meters, or angle in radians. | Infinity | +| **stiffness** | `number` | The stiffness strength used when the joint is extended beyond the limit. | Infinity | +| **damping** | `number` | Damping applied to the velocity when the joint is extended beyond the limit. | 0.0 | + +This approach of building joints from a set of individual limit is flexible enough to allow for many types of bilateral joints. For example, a hinged door can be constructed by locating the attachment frames at the point where the physical hinge would be on each body, adding a 3D linear limit with `"min"` and `"max"` set to zero, a 1D angular limit on the vertical axis with `"min"` and `"max"` describing the swing angle of the door, and a 2D angular limit on the horizontal axes with `"min"` and `"max"` set to zero. + +### Linear Axes + +The `"linearAxes"` property is an array of integers that represent the indices of the linear axes which are limited by this constraint. Linear axes constrain the linear motion in 1, 2, or 3 dimensions. Can only contain 3 possible values: 0 (X), 1 (Y), or 2 (Z). If not specified or empty, the constraint does not limit linear motion. + +- A 1D linear limit should restrict the translation between the attachment frames along one axis. +- A 2D linear limit should restrict the translation between the attachment frames on two axes. +- A 3D linear limit should restrict the translation between the attachment frames on all three axes. + +To restrict linear movement on a line, use a 2D linear limit with min and max equal, and to restrict movement to a line segment, add a 1D linear limit with a range the size of the line segment. See [slider_ball.gltf](examples/slider_ball.gltf) or [swing_and_slide.gltf](examples/swing_and_slide.gltf) for examples. + +At least one of `"linearAxes"` or `"angularAxes"` must be set to a valid non-empty value. If both are empty or not present, the joint limit is invalid. -### Example: +### Angular Axes -This example defines 2 dynamic bodies that are connected with a joint that constrains linearly on a fixed point, also known as a "pin" joint. This example JSON is a subset of the [examples/simple_joint.gltf](examples/simple_joint.gltf) file. +The `"angularAxes"` property is an array of integers that represent the indices of the angular axes which are limited by this constraint. Angular axes constrain the angular motion in 1, 2, or 3 dimensions. Can only contain 3 possible values: 0 (X), 1 (Y), or 2 (Z). If not specified or empty, the constraint does not limit angular motion. + +- A 1D angular limit should restrict the angle between the attachment frames around one axis. +- A 2D angular limit should restrict the angle between the attachment frames around two axes. +- A 3D angular limit should restrict the angle between the attachment frames around all three axes. + +To restrict angular movement on a circle, like a hinge, use a 2D angular limit with min and max equal, and to restrict movement to a range of angles, add a 1D angular limit with a range the size of the angle range. See [pendulum_balls.gltf](examples/pendulum_balls.gltf) or [swing_and_slide.gltf](examples/swing_and_slide.gltf) for examples. + +At least one of `"linearAxes"` or `"angularAxes"` must be set to a valid non-empty value. If both are empty or not present, the joint limit is invalid. + +### Min + +The `"min"` property is a number that represents the minimum of the allowed range of relative distance in meters, or angle in radians. If not specified, the default value is `-Infinity`, which means the minimum is unbounded. + +When the relative offset between the connected nodes is between the min and max, the limit is considered non-violating and no corrective forces are applied. Outside of this range, the behavior depends on the stiffness and damping properties. If both `"min"` and `"max"` are set to the same value, the joint is fixed at that position or angle. If everything is fixed, this is also known as a "weld" joint. + +### Max + +The `"max"` property is a number that represents the maximum of the allowed range of relative distance in meters, or angle in radians. If not specified, the default value is `Infinity`, which means the maximum is unbounded. + +When the relative offset between the connected nodes is between the min and max, the limit is considered non-violating and no corrective forces are applied. Outside of this range, the behavior depends on the stiffness and damping properties. If both `"min"` and `"max"` are set to the same value, the joint is fixed at that position or angle. If everything is fixed, this is also known as a "weld" joint. + +### Stiffness + +The `"stiffness"` property is a number that represents the stiffness strength used to calculate a restorative force when the joint is extended beyond the limit. If not specified or negative, the limit should be infinitely stiff. + +The stiffness value is also known as the spring constant. Specifying a finite stiffness will cause the limit to become soft at the limits, and then the stiffness should be used as the spring constant in the Hooke's Law spring equation. + +### Damping + +The `"damping"` property is a number that represents damping applied to the velocity when the joint is extended beyond the limit. If not specified, the default value is 0.0. + +### Example: Fixed/Weld Joint + +The following example defines a fixed joint composed of a single limit, which has a min/max of `0.0` and applies to all linear and angular axes. This means that no movement is allowed between the bodies connected by this joint, which effectively welds the two nodes together: ```json { - "asset": { - "version": "2.0" - }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], "extensions": { "OMI_physics_joint": { - "constraints": [ + "physicsJoints": [ { - "linearAxes": [0, 1, 2] + "limits": [ + { + "angularAxes": [0, 1, 2], + "linearAxes": [0, 1, 2], + "max": 0.0, + "min": 0.0 + } + ] } ] } - }, - "nodes": [ - { - "extensions": { - "OMI_physics_joint": { - "constraints": [0], - "nodeA": 1, - "nodeB": 2 - } - }, - "name": "PinJoint", - "translation": [-0.23, 0.6, 0.0] - }, - { - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "BodyA", - "rotation": [0.0, 0.0, -0.17364804446697, 0.984807789325714], - "translation": [-0.45, 0.68, 0.0] - }, - { - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "BodyB", - "translation": [0.0, 0.6, 0.0] - } - ] + } } ``` -More example assets can be found in the [examples/](examples/) folder. - -## glTF Schema Updates - -This extension consists of three new data structures for defining joints. A glTF file with joints should have a document-level `"OMI_physics_joint"` object added to the document `"extensions"` which contains an array of joint constraints. Each joint constraint is an object defined as the below spec. Then, the key `"OMI_physics_joint"` can be added to the node-level `"extensions"` of a glTF node to define that node as a physics joint. Each joint node has an array of constraints that references the document-level constraints array by index, and each joint node also references 2 physics body nodes. - -The extension must also be added to the glTF's `extensionsUsed` array and because it is optional, it does not need to be added to the `extensionsRequired` array. +The damping and stiffness are not specified in the above example, which means the joint limit has no damping and is infinitely stiff. With this example weld joint, the physics engine should ensure that their global transforms are equal to each other, and prevent the connected nodes from moving relative to each other in global space. -### Joint Constraint Property Summary +## Joint Drives -| | Type | Description | Default value | -| --------------- | -------------- | ----------------------------------------------------------------- | ---------------- | -| **linearAxes** | `number[0..3]` | The axes to constrain. Can only contain 0 (X), 1 (Y), or 2 (Z). | [] (empty array) | -| **angularAxes** | `number[0..3]` | The axes to constrain. Can only contain 0 (X), 1 (Y), or 2 (Z). | [] (empty array) | -| **lowerLimit** | `number` | The lower limit of the constraint, in meters or radians. | 0.0 | -| **upperLimit** | `number` | The lower limit of the constraint, in meters or radians. | 0.0 | -| **stiffness** | `number` | The stiffness of the limits, how hard to spring back when beyond. | Infinity | -| **damping** | `number` | When beyond the limits, the damping of the springing back motion. | 1.0 | +Joint drives allow a joint to apply forces to the connected nodes to drive them to a desired relative target. Each joint drive describes only a single degree of freedom in the joint's local space, specified with a combination of the required `"type"` and `"axis"` parameters. Drives can have a target linear velocity or angular velocity, in which case they are known as **motors**. Drives can also have a target position or angle, in which case they are known as **springs**. -A joint constraint should define at least one linear axis or one angular axis, otherwise the joint constraint will not perform any constraints. +| | Type | Description | Default value | +| ------------------ | --------- | -------------------------------------------------------------------------------------- | -------------------- | +| **type** | `string` | Determines the type of degree of freedom which this drive controls: linear or angular. | Required, no default | +| **mode** | `string` | Specifies the force calculation mode: force or acceleration. | Required, no default | +| **axis** | `integer` | The index of the axis which this drive applies forces on. | Required, no default | +| **maxForce** | `number` | The maximum force (or torque, for angular drives) the drive can apply. | Infinity | +| **positionTarget** | `number` | The target translation/angle along the axis that this drive attempts to achieve. | None | +| **velocityTarget** | `number` | The target velocity along/about the axis that this drive attempts to achieve. | None | +| **stiffness** | `number` | The stiffness of the drive, scaling the force based on the position target. | 0.0 | +| **damping** | `number` | The damping of the drive, scaling the force based on the velocity target. | 0.0 | -The reason that joints constraints are defined at the document-level and referenced on nodes is because it's very common to have many joints with the same constraints. For example, a long rope using many bodies each with pin joints (linear axes constrained) would have the same joint constraints repeated many times, but with different nodes attached. +### Type -#### Linear Axes +The `"type"` property is a string that determines the type of degree of freedom which this drive controls. The value must be either `"linear"`, `"angular"`, or a value specified by another extension. This property is required and has no default value. -The `"linearAxes"` property defines a list of linear axes to constrain. Can only contain 3 possible values, 0 (X), 1 (Y), or 2 (Z). If empty or not specified, this joint constraint does not constrain linearly. +### Mode -#### Angular Axes +The `"mode"` property is a string that specifies the force calculation mode. The value must be either `"force"`, `"acceleration"`, or a value specified by another extension. This property is required and has no default value. -The `"angularAxes"` property defines a list of angular axes to constrain. Can only contain 3 possible values, 0 (X), 1 (Y), or 2 (Z). If empty or not specified, this joint constraint does not constrain angularly. +The acceleration mode is useful for tuning the drive parameters to scale the force by the effective inertia of the driven degree of freedom. This mode allows more easily achieving the desired behavior in scenarios where the masses or mass distributions of the connected nodes are not known in advance. However, not all physics engines support this mode. -#### Lower Limit +### Axis -The `"lowerLimit"` property defines the lower limit of the constraint in meters or radians, depending on whether the constraint is linear or angular. If not specified, the default value is 0.0. +The `"axis"` property is an integer that represents the index of the axis which this drive applies forces on. The value must be 0 (X), 1 (Y), or 2 (Z). This property is required and has no default value. -The lower limit must be less than or equal to the upper limit, otherwise the constraint is invalid. If the lower and upper limits are equal, the constraint is fixed on that value. +### Max Force -#### Upper Limit +The `"maxForce"` property is a number that represents the maximum force (or torque, for angular drives) the drive can apply. If not specified or negative, the drive is not force-limited. -The `"upperLimit"` property defines the upper limit of the constraint in meters or radians, depending on whether the constraint is linear or angular. If not specified, the default value is 0.0. +### Position Target -The upper limit must be greater than or equal to the lower limit, otherwise the constraint is invalid. If the lower and upper limits are equal, the constraint is fixed on that value. +The `"positionTarget"` property is a number that represents the target position or angle along the axis that this drive attempts to achieve. If not specified, the drive is not a spring that attempts to reach a target position or angle. -#### Stiffness +When a position target is specified, the drive force is proportional to `stiffness * (positionTarget - positionCurrent) + damping * (velocityTarget - velocityCurrent)` where `positionCurrent` and `velocityCurrent` are the signed values of the position and velocity of the connected glTF node relative to the joint glTF node. -The `"stiffness"` property defines how soft or hard the limits are, and how much force should be applied to the bodies to spring back once they surpasses the limits. Must be positive. If not specified, the default value is infinity. +### Velocity Target -A lower value indicates a softer limit, while a higher value indicades a harder limit. A value of infinity means the limits should be completely hard and may not be surpassed. Implementations are expected to clamp this to within the limits of the physics engine. For example, if a physics engine cannot handle an infinite stiffness, it should be set to a high value, since an extremely stiff joint is close enough to an infinitely stiff joint. For more information, see the Wikipedia article on stiffness. +The `"velocityTarget"` property is a number that represents the target linear velocity or angular velocity the axis that this drive attempts to achieve. If not specified, the drive is not a motor that attempts to reach a target velocity. -#### Damping +When a velocity target is specified, but not a position target, the drive force is proportional to `damping * (velocityTarget - velocityCurrent)` where `velocityCurrent` is the signed value of the velocity of the connected glTF node relative to the joint glTF node. -The `"damping"` property defines the amount of damping the bodies should experience while the bodies surpasses the limits and are springing back to be within them. Damping must not be applied when within the limits. Must be non-negative. If not specified, the default value is 1.0. +### Stiffness -### Node Property Summary +The `"stiffness"` property is a number that represents the stiffness of the drive, scaling the force based on the position target. If not specified, the default value is 0.0, which means the drive does not have any spring force. -| | Type | Description | Default value | -| --------------- | ---------- | -------------------------------------------------------------------------- | -------------------- | -| **constraints** | `number[]` | Array of indices in the document-level constraint array. Must be integers. | Required, no default | -| **nodeA** | `number` | Node index of one physics body used by the joint. Must be an integer. | Required, no default | -| **nodeB** | `number` | Node index of one physics body used by the joint. Must be an integer. | Required, no default | +The stiffness value is also known as the spring constant. In order to make the drive act as a spring, this must be set to a positive value, along with setting a position target, in which case the stiffness should be used as the spring constant in the Hooke's Law spring equation. -#### Constraints +### Damping -The `"constraints"` property defines the joint constraints to use for this joint. Must be an array of integers which are the index of the constraint in the document-level array. +The `"damping"` property is a number that represents the damping of the drive, scaling the force based on the velocity target. If not specified, the default value is 0.0, which means the drive does not have any damping force. -If a joint node has multiple joint constraints that overlap each other, later constraints should override the previous constraints. +## Special Cases -#### Node A and Node B - -Each of these properties defines one of two bodies used by the joint. Must be an integer which is the index of the glTF node, and that node must be a physics body defined using the `OMI_physics_body` spec. +While a generic joint type is very useful and extensible, it's also worth defining when a generic joint is equivalent to a special-purpose joint. These mappings can be used to convert to more optimized joint types if supported in a physics engine, or as simply a friendly name to display to a user. -At least one of the connected nodes must be a physics body using dynamic rigid body physics, meaning `OMI_physics_body` motion type set to "dynamic". If neither node is using dynamic rigid body physics, the joints will not work. When physics body nodes are joined, they should not collide with each other. One or zero of the nodes can be a solid body that cannot be moved by joints, meaning `OMI_physics_body` motion type set to "static" or "kinematic". A connected node cannot be null, cannot be a non-body, and cannot be a trigger body. +In this chart, "fixed" means "limited with min and max set to zero", and "free" means "not limited". -The position on the body on which the joint operates is determined by the position of the joint relative to each body node. As such, the initial position of the joint node matters. +| Special case name | Description | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| Fixed / Weld Joint | All axes fixed. | +| Pin Joint | All linear axes fixed, all angular axes free. | +| Hinge Joint | One angular axis limited with non-equal min and max limits, the rest are fixed. | +| Slider Joint | One linear axis and optionally the angular axis around it limited with non-equal min and max limits, the rest are fixed. | -### Document Property Summary +## glTF Object Model -| | Type | Description | Default value | -| --------------- | ---------- | ---------------------------------- | -------------------- | -| **constraints** | `object[]` | Array of joint constraint objects. | Required, no default | +The following JSON pointers are defined representing mutable properties defined by this extension, for use with the glTF Object Model including extensions such as `KHR_animation_pointer` and `KHR_interactivity`. -### Special Cases +| Pointer | Type | +| ------------------------------------------------------------------------- | --------- | +| `/extensions/OMI_physics_joint/physicsJoints/{}/limits/{}/min` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/limits/{}/max` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/limits/{}/stiffness` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/limits/{}/damping` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/drives/{}/maxForce` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/drives/{}/positionTarget` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/drives/{}/velocityTarget` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/drives/{}/stiffness` | `float` | +| `/extensions/OMI_physics_joint/physicsJoints/{}/drives/{}/damping` | `float` | +| `/nodes/{}/extensions/OMI_physics_joint/joint/enableCollision` | `boolean` | -While a generic joint type is very useful and extensible, it's also worth defining when a generic joint is equivalent to a special-purpose joint. These mappings can be used to convert to more optimized joint types if supported in a physics engine, or as simply a friendly name to display to a user. +Additionally, the following JSON pointers are defined for read-only properties: -In this chart, "fixed" means "constrained with lower and upper limits set to zero", and "free" means "not constrained". +| Pointer | Type | +| ---------------------------------------------------- | ----- | +| `/extensions/OMI_physics_joint/physicsJoints.length` | `int` | -| Special case name | Description | -| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- | -| Fixed / Weld Joint | All axes fixed. | -| Pin Joint | All linear axes fixed, all angular axes free. | -| Hinge Joint | One angular axis constrained with non-equal lower and upper limits, the rest are fixed. | -| Slider Joint | One linear axis and optionally the angular axis around it constrained with non-equal lower and upper limits, the rest are fixed. | +## JSON Schema -### JSON Schema +See the following schema files: -See [glTF.OMI_physics_joint.joint_constraint.schema.json](schema/glTF.OMI_physics_joint.joint_constraint.schema.json), [node.OMI_physics_joint.schema.json](schema/node.OMI_physics_joint.schema.json), and [glTF.OMI_physics_joint.schema.json](schema/glTF.OMI_physics_joint.schema.json) for the schemas. +- Per-node joint properties: [node.OMI_physics_joint.schema.json](schema/node.OMI_physics_joint.schema.json) +- Document-level array of joint settings: [glTF.OMI_physics_joint.schema.json](schema/glTF.OMI_physics_joint.schema.json) + - Joint settings: [glTF.OMI_physics_joint.joint.schema.json](schema/glTF.OMI_physics_joint.joint.schema.json) + - Joint limit properties: [glTF.OMI_physics_joint.joint.limit.schema.json](schema/glTF.OMI_physics_joint.joint.limit.schema.json) + - Joint drive properties: [glTF.OMI_physics_joint.joint.drive.schema.json](schema/glTF.OMI_physics_joint.joint.drive.schema.json) ## Known Implementations -* Godot Engine add-on +- Godot Engine add-on: https://github.com/omigroup/omi-godot/tree/main/addons/omi_extensions/physics_joint ## Resources: -* Godot Joint3D https://docs.godotengine.org/en/latest/classes/class_generic6dofjoint3d.html -* Unity Joints https://docs.unity3d.com/Manual/Joints.html -* Wikipedia Stiffness https://en.wikipedia.org/wiki/Stiffness +- Godot Joint3D https://docs.godotengine.org/en/latest/classes/class_generic6dofjoint3d.html +- Unity Joints https://docs.unity3d.com/Manual/Joints.html +- Wikipedia Stiffness https://en.wikipedia.org/wiki/Stiffness diff --git a/extensions/2.0/OMI_physics_joint/examples/hanging_rope.gltf b/extensions/2.0/OMI_physics_joint/examples/hanging_rope.gltf index 72940f7..a1f18fc 100644 --- a/extensions/2.0/OMI_physics_joint/examples/hanging_rope.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/hanging_rope.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 0.25, - 0.25, - 0.25 - ], - "min": [ - -0.25, - -0.25, - -0.25 - ], + "max": [0.25, 0.25, 0.25], + "min": [-0.25, -0.25, -0.25], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -147,28 +85,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -177,16 +105,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -195,18 +115,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -215,16 +125,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -233,28 +135,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 14, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -263,16 +155,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -281,18 +165,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -301,16 +175,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -319,200 +185,69 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 19, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 288 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 672 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 960 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 1152 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 1296 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 24696 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 55896 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 79296 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 94896 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 136368 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 159768 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 190968 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 214368 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 229968 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 271440 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 294840 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 326040 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 349440 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 365040 - } - ], - "buffers": [ - { - "byteLength": 406512, - "uri": "hanging_rope0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.05 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 288, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 288, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 960, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 1152, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 1224, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 24624, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 55824, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 79224, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 94824, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 115560, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 138960, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 170160, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 193560, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 209160, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 229896, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 253296, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 284496, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 307896, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 323496, "target": 34963 } ], + "buffers": [{ "byteLength": 344232, "uri": "hanging_rope0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "box", - "box": { - "size": [0.5, 0.5, 0.5] - } - }, - { - "type": "capsule", - "capsule": { - "height": 0.5, - "radius": 0.05 - } - } + "OMI_physics_joint": { + "physicsJoints": [ + { "limits": [{ "damping": 1, "linearAxes": [0, 1, 2], "max": 0, "min": 0, "stiffness": 0.3 }] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "linearAxes": [ - 0, - 1, - 2 - ], - "stiffness": 0.300000011920929 - } + "OMI_physics_shape": { + "shapes": [ + { "box": { "size": [0.5, 0.5, 0.5] }, "type": "box" }, + { "capsule": { "height": 0.5, "radius": 0.05 }, "type": "capsule" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -520,12 +255,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -533,12 +263,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -546,12 +271,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -559,17 +279,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -577,17 +290,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -595,17 +301,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 12, - "POSITION": 10, - "TANGENT": 11, - "TEXCOORD_0": 13 - }, + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, "indices": 14, "material": 2, "mode": 4 @@ -613,17 +312,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 17, - "POSITION": 15, - "TANGENT": 16, - "TEXCOORD_0": 18 - }, + "attributes": { "NORMAL": 17, "POSITION": 15, "TANGENT": 16, "TEXCOORD_0": 18 }, "indices": 19, "material": 3, "mode": 4 @@ -632,262 +324,95 @@ } ], "nodes": [ + { "children": [1, 6, 11, 16, 19], "name": "HangingRope" }, { - "children": [ - 1, - 4, - 5, - 8, - 9, - 12, - 13, - 16 - ], - "extensions": {}, - "name": "HangingRope" - }, - { - "children": [ - 2 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [2, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "Ceiling", - "translation": [ - 0.00000000000208164995657567, - 1.5, - 0.00000000000208164995657567 - ] + "translation": [0, 1.5, 0] }, { - "children": [ - 3 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "CeilingShape" + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "CeilingCollider" }, + { "mesh": 0, "name": "CeilingMesh" }, { - "extensions": {}, - "mesh": 0, - "name": "CeilingMesh" - }, - { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 5, - "nodeB": 1 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, "name": "PinJoint1", - "translation": [ - -0.0000000279397, - 1.25, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, -0.25881914260901, 0.965925800162279], + "translation": [0.197224363737311, 0.00160251509060894, 0] }, + { "name": "CeilingJointAttachment", "translation": [-0.00000002794178, -0.25, 0] }, { - "children": [ - 6 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [7, 10, 4], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "RopeSegmentTop", "rotation": [ - 0.000000000000000213587655926077, - 0.000000000000000123314960753772, - 0.258819162845612, - 0.965925812721252 + 0, 0, 0.258819142609008, 0.965925800162279 ], - "translation": [ - -0.17000000178814, - 1.14999997615814, - 0.00000000000208164995657567 - ] + "translation": [-0.17, 1.15, 0] }, { - "children": [ - 7 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeTop", + "children": [8], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderTop", "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 + 0, 0, 0.707106796640861, + 0.707106765732234 ] }, + { "mesh": 1, "name": "RopeMeshTop" }, { - "extensions": {}, - "mesh": 1, - "name": "RopeMeshTop" - }, - { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 9, - "nodeB": 5 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 10, "joint": 0 } }, "name": "PinJoint2", - "translation": [ - -0.37000000476837, - 1.02999997138977, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, -0.17364804748477, 0.984807775966826], + "translation": [0.224696991890219, 0.00335123794016523, 0] }, { - "children": [ - 10 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "RopeSegmentMiddle", - "rotation": [ - 0.000000000000000202027284087501, - 0.000000000000000141460709354785, - 0.173648044466972, - 0.984807789325714 - ], - "translation": [ - -0.5799999833107, - 0.949999988079071, - 0.00000000000208164995657567 - ] + "name": "RopeSegmentTopJointAttachment", + "rotation": [0, 0, -0.25881914260901, 0.965925800162279], + "translation": [-0.23320516309786, -0.00392300274365, -0] }, { - "children": [ - 11 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeMiddle", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "children": [12, 15, 9], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "RopeSegmentMiddle", + "rotation": [0, 0, 0.173648047484773, 0.984807775966826], + "translation": [-0.58, 0.95, 0] }, { - "extensions": {}, - "mesh": 2, - "name": "RopeMeshMiddle" + "children": [13], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderMiddle", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 2, "name": "RopeMeshMiddle" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 13, - "nodeB": 9 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 15, "joint": 0 } }, "name": "PinJoint3", - "translation": [ - -0.80000001192093, - 0.870000004768372, - 0.00000000000208164995657567 - ] + "translation": [0.23, 0, 0] }, { - "children": [ - 14 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "RopeSegmentBottom", - "translation": [ - -1.02999997138977, - 0.870000004768372, - 0.00000000000208164995657567 - ] + "name": "RopeSegmentMiddleJointAttachment", + "rotation": [0, 0, -0.17364804748477, 0.984807775966826], + "translation": [-0.23409391611441, 0.0000689599576140232, -0] }, { - "children": [ - 15 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeBottom", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "children": [17, 14], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "RopeSegmentBottom", + "translation": [-1.03, 0.87, 0] }, { - "extensions": {}, - "mesh": 3, - "name": "RopeMeshBottom" + "children": [18], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderBottom", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.600000023841858, - 1.5 - ] - } + { "mesh": 3, "name": "RopeMeshBottom" }, + { "camera": 0, "name": "Camera", "translation": [0, 0.6, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/hanging_rope0.bin b/extensions/2.0/OMI_physics_joint/examples/hanging_rope0.bin index 4c654f4..135e2ff 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/hanging_rope0.bin and b/extensions/2.0/OMI_physics_joint/examples/hanging_rope0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/examples/pendulum_balls.gltf b/extensions/2.0/OMI_physics_joint/examples/pendulum_balls.gltf index 2c831d7..ede9ed5 100644 --- a/extensions/2.0/OMI_physics_joint/examples/pendulum_balls.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/pendulum_balls.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0.1, - 0.1 - ], - "min": [ - -1, - -0.1, - -0.1 - ], + "max": [1, 0.1, 0.1], + "min": [-1, -0.1, -0.1], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.249717, - 0.25, - 0.249717 - ], - "min": [ - -0.249717, - -0.25, - -0.249717 - ], + "max": [0.249716833233833, 0.25, 0.249716833233833], + "min": [-0.24971683323383, -0.25, -0.24971683323383], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.998868, - 1, - 0.998868 - ], - "min": [ - -0.998869, - -1, - -0.998867 - ], + "max": [0.998867988586426, 1, 0.998867988586426], + "min": [-0.99886876344681, -1, -0.99886721372604], "normalized": false, "type": "VEC3" }, @@ -147,28 +85,18 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 12672, - "max": [ - 2209 - ], - "min": [ - 0 - ], + "max": [2209], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -177,16 +105,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.5, - 0.05 - ], - "min": [ - -0.05, - -0.5, - -0.05 - ], + "max": [0.05, 0.5, 0.05], + "min": [-0.05, -0.5, -0.05], "normalized": false, "type": "VEC3" }, @@ -195,18 +115,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -215,16 +125,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -233,28 +135,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 14, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -263,16 +155,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.249717, - 0.25, - 0.249717 - ], - "min": [ - -0.249717, - -0.25, - -0.249717 - ], + "max": [0.249716833233833, 0.25, 0.249716833233833], + "min": [-0.24971683323383, -0.25, -0.24971683323383], "normalized": false, "type": "VEC3" }, @@ -281,18 +165,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -301,16 +175,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.998868, - 1, - 0.998868 - ], - "min": [ - -0.998869, - -1, - -0.998867 - ], + "max": [0.998867988586426, 1, 0.998867988586426], + "min": [-0.99886876344681, -1, -0.99886721372604], "normalized": false, "type": "VEC3" }, @@ -319,28 +185,18 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 19, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 12672, - "max": [ - 2209 - ], - "min": [ - 0 - ], + "max": [2209], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -349,16 +205,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.5, - 0.05 - ], - "min": [ - -0.05, - -0.5, - -0.05 - ], + "max": [0.05, 0.5, 0.05], + "min": [-0.05, -0.5, -0.05], "normalized": false, "type": "VEC3" }, @@ -367,18 +215,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -387,16 +225,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -405,28 +235,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 24, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -435,16 +255,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.249717, - 0.25, - 0.249717 - ], - "min": [ - -0.249717, - -0.25, - -0.249717 - ], + "max": [0.249716833233833, 0.25, 0.249716833233833], + "min": [-0.24971683323383, -0.25, -0.24971683323383], "normalized": false, "type": "VEC3" }, @@ -453,18 +265,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -473,16 +275,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.998868, - 1, - 0.998868 - ], - "min": [ - -0.998869, - -1, - -0.998867 - ], + "max": [0.998867988586426, 1, 0.998867988586426], + "min": [-0.99886876344681, -1, -0.99886721372604], "normalized": false, "type": "VEC3" }, @@ -491,28 +285,18 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 29, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 12672, - "max": [ - 2209 - ], - "min": [ - 0 - ], + "max": [2209], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -521,16 +305,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.5, - 0.05 - ], - "min": [ - -0.05, - -0.5, - -0.05 - ], + "max": [0.05, 0.5, 0.05], + "min": [-0.05, -0.5, -0.05], "normalized": false, "type": "VEC3" }, @@ -539,18 +315,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -559,16 +325,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -577,281 +335,89 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 34, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 288 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 672 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 960 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 1152 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 1296 - }, - { - "buffer": 0, - "byteLength": 35360, - "byteOffset": 27816 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 63176 - }, - { - "buffer": 0, - "byteLength": 17680, - "byteOffset": 89696 - }, - { - "buffer": 0, - "byteLength": 50688, - "byteOffset": 107376 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 158064 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 181464 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 212664 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 236064 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 251664 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 293136 - }, - { - "buffer": 0, - "byteLength": 35360, - "byteOffset": 319656 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 355016 - }, - { - "buffer": 0, - "byteLength": 17680, - "byteOffset": 381536 - }, - { - "buffer": 0, - "byteLength": 50688, - "byteOffset": 399216 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 449904 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 473304 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 504504 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 527904 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 543504 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 584976 - }, - { - "buffer": 0, - "byteLength": 35360, - "byteOffset": 611496 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 646856 - }, - { - "buffer": 0, - "byteLength": 17680, - "byteOffset": 673376 - }, - { - "buffer": 0, - "byteLength": 50688, - "byteOffset": 691056 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 741744 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 765144 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 796344 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 819744 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 835344 - } - ], - "buffers": [ - { - "byteLength": 876816, - "uri": "pendulum_balls0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.0500000007450581 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 288, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 288, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 960, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 1152, "target": 34963 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 1224, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 27744, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 63104, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 89624, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 25344, "byteOffset": 107304, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 132648, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 156048, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 187248, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 210648, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 226248, "target": 34963 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 246984, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 273504, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 308864, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 335384, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 25344, "byteOffset": 353064, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 378408, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 401808, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 433008, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 456408, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 472008, "target": 34963 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 492744, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 519264, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 554624, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 581144, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 25344, "byteOffset": 598824, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 624168, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 647568, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 678768, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 702168, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 717768, "target": 34963 } ], + "buffers": [{ "byteLength": 738504, "uri": "pendulum_balls0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "box", - "box": { - "size": [2, 0.2, 0.2] - } - }, + "OMI_physics_joint": { + "physicsJoints": [ { - "type": "sphere", - "sphere": { - "radius": 0.25 - } + "limits": [ + { "linearAxes": [0, 1, 2], "max": 0, "min": 0, "stiffness": 0.3 }, + { "angularAxes": [0, 1], "damping": 1, "max": 0, "min": 0, "stiffness": 0.3 } + ] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "linearAxes": [ - 0, - 1, - 2 - ], - "stiffness": 0.300000011920929 - }, - { - "angularAxes": [ - 0, - 1 - ], - "stiffness": 0.300000011920929 - } + "OMI_physics_shape": { + "shapes": [ + { "box": { "size": [2, 0.2, 0.2] }, "type": "box" }, + { "sphere": { "radius": 0.25 }, "type": "sphere" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -859,12 +425,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -872,12 +433,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -885,12 +441,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -898,12 +449,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -911,12 +457,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -924,12 +465,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -937,17 +473,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -955,17 +484,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -973,17 +495,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 12, - "POSITION": 10, - "TANGENT": 11, - "TEXCOORD_0": 13 - }, + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, "indices": 14, "material": 2, "mode": 4 @@ -991,17 +506,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 17, - "POSITION": 15, - "TANGENT": 16, - "TEXCOORD_0": 18 - }, + "attributes": { "NORMAL": 17, "POSITION": 15, "TANGENT": 16, "TEXCOORD_0": 18 }, "indices": 19, "material": 3, "mode": 4 @@ -1009,17 +517,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 22, - "POSITION": 20, - "TANGENT": 21, - "TEXCOORD_0": 23 - }, + "attributes": { "NORMAL": 22, "POSITION": 20, "TANGENT": 21, "TEXCOORD_0": 23 }, "indices": 24, "material": 4, "mode": 4 @@ -1027,17 +528,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 27, - "POSITION": 25, - "TANGENT": 26, - "TEXCOORD_0": 28 - }, + "attributes": { "NORMAL": 27, "POSITION": 25, "TANGENT": 26, "TEXCOORD_0": 28 }, "indices": 29, "material": 5, "mode": 4 @@ -1045,17 +539,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 32, - "POSITION": 30, - "TANGENT": 31, - "TEXCOORD_0": 33 - }, + "attributes": { "NORMAL": 32, "POSITION": 30, "TANGENT": 31, "TEXCOORD_0": 33 }, "indices": 34, "material": 6, "mode": 4 @@ -1064,286 +551,85 @@ } ], "nodes": [ + { "children": [1, 6, 12, 18, 22], "name": "PendulumBalls" }, { - "children": [ - 1, - 4, - 5, - 9, - 10, - 14, - 15, - 19 - ], - "extensions": {}, - "name": "PendulumBalls" - }, - { - "children": [ - 2 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [2, 4, 10, 16], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "TopBody", - "translation": [ - 0.00000000000208164995657567, - 1, - 0.00000000000208164995657567 - ] + "translation": [0, 1, 0] }, { - "children": [ - 3 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, "name": "TopBodyShape" }, + { "mesh": 0, "name": "TopBodyMesh" }, { - "extensions": {}, - "mesh": 0, - "name": "TopBodyMesh" - }, - { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0, - 1 - ], - "nodeA": 1, - "nodeB": 5 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, "name": "HingeJoint1", - "translation": [ - 0.00000000000208164995657567, - 0.899999976158142, - 0.00000000000208164995657567 - ] + "translation": [0, -0.1, 0] }, + { "name": "Ball1JointAttachment", "translation": [0, 1.15, 0] }, { - "children": [ - 6, - 8 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [7, 9, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "Ball1", - "translation": [ - 0.00000000000208164995657567, - -0.25, - 0.00000000000208164995657567 - ] - }, - { - "children": [ - 7 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "BallShape1" - }, - { - "extensions": {}, - "mesh": 1, - "name": "BallMesh1" + "translation": [0, -0.25, 0] }, + { "children": [8], "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "BallShape1" }, + { "mesh": 1, "name": "BallMesh1" }, + { "mesh": 2, "name": "BallStringMesh1", "translation": [0, 0.7, 0] }, { - "extensions": {}, - "mesh": 2, - "name": "BallStringMesh1", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "extensions": { "OMI_physics_joint": { "connectedNode": 11, "joint": 0 } }, + "name": "HingeJoint2", + "translation": [-0.45, -0.1, 0] }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0, - 1 - ], - "nodeA": 1, - "nodeB": 10 - } - }, - "name": "HingeJoint2", - "translation": [ - -0.44999998807907, - 0.899999976158142, - 0.00000000000208164995657567 - ] + "name": "Ball2JointAttachment", + "rotation": [0, 0, 0.38268343236509, 0.923879532511287], + "translation": [-0.00000197989837, 1.14999766654834, -0] }, { - "children": [ - 11, - 13 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [13, 15, 11], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "Ball2", - "rotation": [ - 0.000000000000000094381003489835, - 0.000000000000000227855912687686, - -0.38268345594406, - 0.923879563808441 - ], - "translation": [ - -1.26317000389099, - 0.0868272036314011, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, -0.38268343236509, 0.923879532511287], + "translation": [-1.26317, 0.0868272, 0] }, { - "children": [ - 12 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, + "children": [14], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "BallShape2" }, + { "mesh": 3, "name": "BallMesh2" }, + { "mesh": 4, "name": "BallStringMesh2", "translation": [0, 0.7, 0] }, { - "extensions": {}, - "mesh": 3, - "name": "BallMesh2" - }, - { - "extensions": {}, - "mesh": 4, - "name": "BallStringMesh2", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "extensions": { "OMI_physics_joint": { "connectedNode": 17, "joint": 0 } }, + "name": "HingeJoint3", + "rotation": [0, 0, 0.258819142609008, 0.965925800162279], + "translation": [0.45, -0.1, 0] }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0, - 1 - ], - "nodeA": 1, - "nodeB": 15 - } - }, - "name": "HingeJoint3", - "rotation": [ - 0.000000000000000213587655926077, - 0.000000000000000123314960753772, - 0.258819162845612, - 0.965925812721252 - ], - "translation": [ - 0.449999988079071, - 0.899999976158142, - 0.00000000000208164995657567 - ] + "name": "Ball3JointAttachment", + "rotation": [0.00000000000000022785586360294, 0, 0.923879510819465, -0.38268348473378], + "translation": [0.00000141310155876706, 1.14999530578692, 0] }, { - "children": [ - 16, - 18 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [19, 21, 17], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "Ball3", - "rotation": [ - 0.000000000000000440183937976967, - -0, - 0.991444885730743, - 0.130526155233383 - ], - "translation": [ - 0.747641980648041, - 2.01080989837646, - 0.00000000000208192989757661 - ] + "rotation": [0, 0, 0.991444867151249, 0.130526148336038], + "translation": [0.747642, 2.01081, 0] }, { - "children": [ - 17 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, + "children": [20], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "BallShape22" }, - { - "extensions": {}, - "mesh": 5, - "name": "BallMesh22" - }, - { - "extensions": {}, - "mesh": 6, - "name": "BallStringMesh22", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] - }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.00000000000208164995657567, - 1.5 - ] - } + { "mesh": 5, "name": "BallMesh22" }, + { "mesh": 6, "name": "BallStringMesh22", "translation": [0, 0.7, 0] }, + { "camera": 0, "name": "Camera", "translation": [0, 0, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/pendulum_balls0.bin b/extensions/2.0/OMI_physics_joint/examples/pendulum_balls0.bin index fc06e65..af2d3ec 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/pendulum_balls0.bin and b/extensions/2.0/OMI_physics_joint/examples/pendulum_balls0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/examples/rope_railing.gltf b/extensions/2.0/OMI_physics_joint/examples/rope_railing.gltf index 0bf001f..37ca511 100644 --- a/extensions/2.0/OMI_physics_joint/examples/rope_railing.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/rope_railing.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 0.075, - 0.55, - 0.075 - ], - "min": [ - -0.075, - -0.55, - -0.075 - ], + "max": [0.0750000029802322, 0.550000011920929, 0.0750000029802322], + "min": [-0.07500000298023, -0.55000001192093, -0.07500000298023], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -147,28 +85,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -177,16 +105,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -195,18 +115,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -215,16 +125,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -233,28 +135,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 14, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -263,16 +155,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -281,18 +165,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -301,16 +175,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -319,28 +185,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 19, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -349,16 +205,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -367,18 +215,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -387,16 +225,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -405,28 +235,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 24, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -435,16 +255,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -453,18 +265,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -473,16 +275,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -491,28 +285,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 29, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -521,16 +305,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 0.075, - 0.55, - 0.075 - ], - "min": [ - -0.075, - -0.55, - -0.075 - ], + "max": [0.0750000029802322, 0.550000011920929, 0.0750000029802322], + "min": [-0.07500000298023, -0.55000001192093, -0.07500000298023], "normalized": false, "type": "VEC3" }, @@ -539,18 +315,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -559,16 +325,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -577,275 +335,84 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 34, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 288 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 672 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 960 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 1152 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 1296 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 24696 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 55896 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 79296 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 94896 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 136368 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 159768 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 190968 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 214368 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 229968 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 271440 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 294840 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 326040 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 349440 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 365040 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 406512 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 429912 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 461112 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 484512 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 500112 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 541584 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 564984 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 596184 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 619584 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 635184 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 676656 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 676944 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 677328 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 677616 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 677808 - } - ], - "buffers": [ - { - "byteLength": 677952, - "uri": "rope_railing0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.0500000007450581 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 288, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 288, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 960, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 1152, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 1224, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 24624, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 55824, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 79224, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 94824, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 115560, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 138960, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 170160, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 193560, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 209160, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 229896, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 253296, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 284496, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 307896, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 323496, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 344232, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 367632, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 398832, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 422232, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 437832, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 458568, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 481968, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 513168, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 536568, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 552168, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 572904, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 573192, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 573576, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 573864, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 574056, "target": 34963 } ], + "buffers": [{ "byteLength": 574128, "uri": "rope_railing0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "box", - "box": { - "size": [0.15, 1.1, 0.15] - } - }, - { - "type": "capsule", - "capsule": { - "height": 0.5, - "radius": 0.05 - } - } + "OMI_physics_joint": { + "physicsJoints": [ + { "limits": [{ "damping": 1, "linearAxes": [0, 1, 2], "max": 0, "min": 0, "stiffness": 0.3 }] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "linearAxes": [ - 0, - 1, - 2 - ], - "stiffness": 0.300000011920929 - } + "OMI_physics_shape": { + "shapes": [ + { "box": { "size": [0.15, 1.1, 0.15] }, "type": "box" }, + { "capsule": { "height": 0.5, "radius": 0.05 }, "type": "capsule" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -853,12 +420,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -866,12 +428,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -879,12 +436,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -892,12 +444,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -905,12 +452,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -918,12 +460,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -931,17 +468,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -949,17 +479,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -967,17 +490,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 12, - "POSITION": 10, - "TANGENT": 11, - "TEXCOORD_0": 13 - }, + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, "indices": 14, "material": 2, "mode": 4 @@ -985,17 +501,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 17, - "POSITION": 15, - "TANGENT": 16, - "TEXCOORD_0": 18 - }, + "attributes": { "NORMAL": 17, "POSITION": 15, "TANGENT": 16, "TEXCOORD_0": 18 }, "indices": 19, "material": 3, "mode": 4 @@ -1003,17 +512,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 22, - "POSITION": 20, - "TANGENT": 21, - "TEXCOORD_0": 23 - }, + "attributes": { "NORMAL": 22, "POSITION": 20, "TANGENT": 21, "TEXCOORD_0": 23 }, "indices": 24, "material": 4, "mode": 4 @@ -1021,17 +523,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 27, - "POSITION": 25, - "TANGENT": 26, - "TEXCOORD_0": 28 - }, + "attributes": { "NORMAL": 27, "POSITION": 25, "TANGENT": 26, "TEXCOORD_0": 28 }, "indices": 29, "material": 5, "mode": 4 @@ -1039,17 +534,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 32, - "POSITION": 30, - "TANGENT": 31, - "TEXCOORD_0": 33 - }, + "attributes": { "NORMAL": 32, "POSITION": 30, "TANGENT": 31, "TEXCOORD_0": 33 }, "indices": 34, "material": 6, "mode": 4 @@ -1058,451 +546,158 @@ } ], "nodes": [ + { "children": [1, 6, 11, 16, 21, 26, 31, 34], "name": "RopeRailing" }, { - "children": [ - 1, - 4, - 5, - 8, - 9, - 12, - 13, - 16, - 17, - 20, - 21, - 24, - 25, - 28 - ], - "extensions": {}, - "name": "RopeRailing" - }, - { - "children": [ - 2 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [2, 4], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "PoleLeft", - "translation": [ - -1.10000002384186, - 0.550000011920929, - 0.00000000000208164735449046 - ] - }, - { - "children": [ - 3 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "PoleShapeLeft" + "translation": [-1.1, 0.55, 0] }, { - "extensions": {}, - "mesh": 0, - "name": "PoleMeshLeft" + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "PoleColliderLeft" }, + { "mesh": 0, "name": "PoleMeshLeft" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 1, - "nodeB": 5 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, "name": "PinJoint1", - "translation": [ - -1.02999997138977, - 0.980000019073486, - 0.00000000000208164735449046 - ] + "translation": [0.07, 0.43, 0] }, { - "children": [ - 6 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "RopeSegmentLeft", - "rotation": [ - 0.000000000000000123314947518882, - 0.000000000000000213587655926077, - -0.25881916284561, - 0.965925812721252 - ], - "translation": [ - -0.86000001430511, - 0.879999995231628, - 0.00000000000208164995657567 - ] + "name": "RopeSegmentLeftJointAttachment", + "rotation": [0, 0, 0.258819142609008, 0.965925800162279], + "translation": [-0.19722438793381, 0.00160250112074917, -0] }, { - "children": [ - 7 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeLeft", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "children": [7, 9, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "RopeSegmentLeft", + "rotation": [0, 0, -0.25881914260901, 0.965925800162279], + "translation": [-0.86, 0.88, 0] }, { - "extensions": {}, - "mesh": 1, - "name": "RopeMeshLeft" + "children": [8], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderLeft", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 1, "name": "RopeMeshLeft" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 5, - "nodeB": 9 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 10, "joint": 0 } }, "name": "PinJoint2", - "translation": [ - -0.66000002622604, - 0.759999990463257, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, 0.258819142609008, 0.965925800162279], + "translation": [0.233205163097861, -0.00392300274365, 0.000000000000000111611896513389] }, { - "children": [ - 10 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "RopeSegmentLeftMiddle", - "rotation": [ - 0.000000000000000141460722589675, - 0.000000000000000202027284087501, - -0.17364804446697, - 0.984807789325714 - ], - "translation": [ - -0.44999998807907, - 0.680000007152557, - 0.00000000000208164995657567 - ] + "name": "RopeSegmentLeftMiddleJointAttachment", + "rotation": [0, 0, 0.173648047484773, 0.984807775966826], + "translation": [-0.22469699189022, 0.0033512379401649, -0] }, { - "children": [ - 11 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeLeftMiddle", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "children": [12, 14, 10], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "RopeSegmentLeftMiddle", + "rotation": [0, 0, -0.17364804748477, 0.984807775966826], + "translation": [-0.45, 0.68, 0] }, { - "extensions": {}, - "mesh": 2, - "name": "RopeMeshLeftMiddle" + "children": [13], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderLeftMiddle", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 2, "name": "RopeMeshLeftMiddle" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 9, - "nodeB": 13 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 15, "joint": 0 } }, "name": "PinJoint3", - "translation": [ - -0.23000000417233, - 0.600000023841858, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, 0.173648047484773, 0.984807775966826], + "translation": [0.234093916114409, 0.0000689599576137456, 0] }, + { "name": "RopeSegmentMiddleJointAttachment", "translation": [-0.23000000000208, 0, 0] }, { - "children": [ - 14 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [17, 19, 15], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "RopeSegmentMiddle", - "translation": [ - 0.00000000000208164995657567, - 0.600000023841858, - 0.00000000000208164995657567 - ] - }, - { - "children": [ - 15 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeMiddle", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "translation": [0, 0.6, 0] }, { - "extensions": {}, - "mesh": 3, - "name": "RopeMeshMiddle" + "children": [18], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderMiddle", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 3, "name": "RopeMeshMiddle" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 13, - "nodeB": 17 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 20, "joint": 0 } }, "name": "PinJoint4", - "translation": [ - 0.230000004172325, - 0.600000023841858, - 0.00000000000208164995657567 - ] + "translation": [0.23, 0, 0] }, { - "children": [ - 18 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "RopeSegmentRightMiddle", - "rotation": [ - 0.000000000000000202027284087501, - 0.000000000000000141460709354785, - 0.173648044466972, - 0.984807789325714 - ], - "translation": [ - 0.449999988079071, - 0.680000007152557, - 0.00000000000208164995657567 - ] + "name": "RopeSegmentRightMiddleJointAttachment", + "rotation": [0, 0, -0.17364804748477, 0.984807775966826], + "translation": [-0.23409391611441, 0.0000689599576137456, -0] }, { - "children": [ - 19 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeRightMiddle", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "children": [22, 24, 20], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "RopeSegmentRightMiddle", + "rotation": [0, 0, 0.173648047484773, 0.984807775966826], + "translation": [0.45, 0.68, 0] }, { - "extensions": {}, - "mesh": 4, - "name": "RopeMeshRightMiddle" + "children": [23], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderRightMiddle", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 4, "name": "RopeMeshRightMiddle" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 17, - "nodeB": 21 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 25, "joint": 0 } }, "name": "PinJoint5", - "translation": [ - 0.660000026226044, - 0.759999990463257, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, -0.17364804748477, 0.984807775966826], + "translation": [0.224696991890219, 0.0033512379401649, 0.0000000000000000453421807645889] }, { - "children": [ - 22 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "RopeSegmentRight", - "rotation": [ - 0.000000000000000213587655926077, - 0.000000000000000123314960753772, - 0.258819162845612, - 0.965925812721252 - ], - "translation": [ - 0.860000014305115, - 0.879999995231628, - 0.00000000000208164995657567 - ] + "name": "RopeSegmentRightJointAttachment", + "rotation": [0, 0, -0.25881914260901, 0.965925800162279], + "translation": [-0.23320516309786, -0.00392300274365, -0] }, { - "children": [ - 23 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "RopeShapeRight", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "children": [27, 29, 25], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "RopeSegmentRight", + "rotation": [0, 0, 0.258819142609008, 0.965925800162279], + "translation": [0.86, 0.88, 0] }, { - "extensions": {}, - "mesh": 5, - "name": "RopeMeshRight" + "children": [28], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, + "name": "RopeColliderRight", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 5, "name": "RopeMeshRight" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 21, - "nodeB": 25 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 30, "joint": 0 } }, "name": "PinJoint6", - "translation": [ - 1.02999997138977, - 0.980000019073486, - 0.00000000000208164735449046 - ] + "rotation": [0, 0, -0.25881914260901, 0.965925800162279], + "translation": [0.197224387933806, 0.00160250112074917, 0] }, + { "name": "PoleRightJointAttachment", "translation": [-0.07, 0.43, 0] }, { - "children": [ - 26 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [32, 30], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "PoleRight", - "translation": [ - 1.10000002384186, - 0.550000011920929, - 0.00000000000208164735449046 - ] + "translation": [1.1, 0.55, 0] }, { - "children": [ - 27 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "PoleShapeRight" + "children": [33], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "PoleColliderRight" }, - { - "extensions": {}, - "mesh": 6, - "name": "PoleMeshRight" - }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.600000023841858, - 1.5 - ] - } + { "mesh": 6, "name": "PoleMeshRight" }, + { "camera": 0, "name": "Camera", "translation": [0, 0.6, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/rope_railing0.bin b/extensions/2.0/OMI_physics_joint/examples/rope_railing0.bin index bf45c6c..a45c6c3 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/rope_railing0.bin and b/extensions/2.0/OMI_physics_joint/examples/rope_railing0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/examples/simple_joint.gltf b/extensions/2.0/OMI_physics_joint/examples/simple_joint.gltf index 792ab37..a3df9bd 100644 --- a/extensions/2.0/OMI_physics_joint/examples/simple_joint.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/simple_joint.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -147,28 +85,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -177,16 +105,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 0.5, - 0.125, - 0.5 - ], - "min": [ - -0.5, - -0.125, - -0.5 - ], + "max": [0.5, 0.125, 0.5], + "min": [-0.5, -0.125, -0.5], "normalized": false, "type": "VEC3" }, @@ -195,18 +115,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -215,16 +125,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -233,170 +135,64 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 14, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 23400 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 54600 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 78000 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 93600 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 135072 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 158472 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 189672 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 213072 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 228672 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 270144 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 270432 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 270816 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 271104 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 271296 - } - ], - "buffers": [ - { - "byteLength": 271440, - "uri": "simple_joint0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.0500000007450581 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 23400, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 23400, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 54600, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 78000, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 93600, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 114336, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 137736, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 168936, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 192336, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 207936, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 228672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 228960, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 229344, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 229632, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 229824, "target": 34963 } ], + "buffers": [{ "byteLength": 229896, "uri": "simple_joint0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "capsule", - "capsule": { - "height": 0.5, - "radius": 0.05 - } - }, - { - "type": "box", - "box": { - "size": [1, 0.25, 1] - } - } + "OMI_physics_joint": { + "physicsJoints": [ + { "limits": [{ "damping": 1, "linearAxes": [0, 1, 2], "max": 0, "min": 0, "stiffness": 0.3 }] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "linearAxes": [0, 1, 2] - } + "OMI_physics_shape": { + "shapes": [ + { "capsule": { "height": 0.5, "radius": 0.05 }, "type": "capsule" }, + { "box": { "size": [1, 0.25, 1] }, "type": "box" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -404,12 +200,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -417,12 +208,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -430,17 +216,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -448,17 +227,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -466,17 +238,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 12, - "POSITION": 10, - "TANGENT": 11, - "TEXCOORD_0": 13 - }, + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, "indices": 14, "material": 2, "mode": 4 @@ -485,120 +250,55 @@ } ], "nodes": [ + { "children": [1, 6, 9, 12], "name": "SimpleJoint" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [0], - "nodeA": 1, - "nodeB": 2 - } - }, - "name": "PinJoint", - "translation": [-0.23, 0.6, 0.0] - }, - { - "children": [4], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [2, 4], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "BodyA", - "rotation": [0.0, 0.0, -0.17364804446697, 0.984807789325714], - "translation": [-0.45, 0.68, 0.0] - }, - { - "children": [6], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "BodyB", - "translation": [0.0, 0.6, 0.0] + "rotation": [0, 0, -0.17364804748477, 0.984807775966826], + "translation": [-0.45, 0.68, 0] }, { - "children": [0, 1, 2, 8, 11], - "extensions": {}, - "name": "SimpleJoint" + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "ColliderA", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 0, "name": "MeshA" }, { - "children": [5], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "ShapeA", - "rotation": [0.0, 0.0, 0.70710676908493, 0.70710676908493] - }, - { - "extensions": {}, - "mesh": 0, - "name": "MeshA" + "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, + "name": "PinJoint", + "rotation": [0, 0, 0.173648047484773, 0.984807775966826], + "translation": [0.234093916114409, 0.0000689599576137456, 0] }, + { "name": "BodyBJointAttachment", "translation": [-0.23, 0, 0] }, { - "children": [7], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "ShapeB", - "rotation": [0.0, 0.0, 0.70710676908493, 0.70710676908493] + "children": [7, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "BodyB", + "translation": [0, 0.6, 0] }, { - "extensions": {}, - "mesh": 1, - "name": "MeshB" + "children": [8], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "ColliderB", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 1, "name": "MeshB" }, { - "children": [9], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [10], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "FloorBody", - "translation": [0.1, 0.0, 0.0] + "translation": [0.1, 0, 0] }, { - "children": [10], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, + "children": [11], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "FloorShape" }, - { - "extensions": {}, - "mesh": 2, - "name": "FloorMesh" - }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [0.0, 0.5, 1.5] - } + { "mesh": 2, "name": "FloorMesh" }, + { "camera": 0, "name": "Camera", "translation": [0, 0.5, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [3] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/simple_joint0.bin b/extensions/2.0/OMI_physics_joint/examples/simple_joint0.bin index e55afe0..0f549b7 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/simple_joint0.bin and b/extensions/2.0/OMI_physics_joint/examples/simple_joint0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/examples/slider_ball.gltf b/extensions/2.0/OMI_physics_joint/examples/slider_ball.gltf index 040f2de..173345a 100644 --- a/extensions/2.0/OMI_physics_joint/examples/slider_ball.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/slider_ball.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0.05, - 0.05 - ], - "min": [ - -1, - -0.05, - -0.05 - ], + "max": [1, 0.05, 0.05], + "min": [-1, -0.05, -0.05], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.249717, - 0.25, - 0.249717 - ], - "min": [ - -0.249717, - -0.25, - -0.249717 - ], + "max": [0.249716833233833, 0.25, 0.249716833233833], + "min": [-0.24971683323383, -0.25, -0.24971683323383], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.998868, - 1, - 0.998868 - ], - "min": [ - -0.998869, - -1, - -0.998867 - ], + "max": [0.998867988586426, 1, 0.998867988586426], + "min": [-0.99886876344681, -1, -0.99886721372604], "normalized": false, "type": "VEC3" }, @@ -147,171 +85,66 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 12672, - "max": [ - 2209 - ], - "min": [ - 0 - ], + "max": [2209], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 288 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 672 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 960 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 1152 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 1296 - }, - { - "buffer": 0, - "byteLength": 35360, - "byteOffset": 27816 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 63176 - }, - { - "buffer": 0, - "byteLength": 17680, - "byteOffset": 89696 - }, - { - "buffer": 0, - "byteLength": 50688, - "byteOffset": 107376 - } - ], - "buffers": [ - { - "byteLength": 158064, - "uri": "slider_ball0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.0500000007450581 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 288, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 288, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 960, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 1152, "target": 34963 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 1224, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 27744, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 63104, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 89624, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 25344, "byteOffset": 107304, "target": 34963 } ], + "buffers": [{ "byteLength": 132648, "uri": "slider_ball0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "box", - "box": { - "size": [2, 0.1, 0.1] - } - }, + "OMI_physics_joint": { + "physicsJoints": [ { - "type": "sphere", - "sphere": { - "radius": 0.25 - } + "limits": [ + { "damping": 0.5, "linearAxes": [0], "max": 0.25, "min": -1.75, "stiffness": 1 }, + { "damping": 1, "linearAxes": [1, 2], "max": 0, "min": 0, "stiffness": 1 }, + { "angularAxes": [0], "max": 0, "min": 0, "stiffness": 1 }, + { "angularAxes": [1, 2], "damping": 1, "max": 0, "min": 0, "stiffness": 1 } + ] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "damping": 0.5, - "linearAxes": [ - 0 - ], - "lowerLimit": -1.75, - "stiffness": 1, - "upperLimit": 0.25 - }, - { - "linearAxes": [ - 1, - 2 - ], - "stiffness": 1 - }, - { - "angularAxes": [ - 0 - ], - "damping": 0, - "stiffness": 1 - }, - { - "angularAxes": [ - 1, - 2 - ], - "stiffness": 1 - } + "OMI_physics_shape": { + "shapes": [ + { "box": { "size": [2, 0.1, 0.1] }, "type": "box" }, + { "sphere": { "radius": 0.25 }, "type": "sphere" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -319,12 +152,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -332,17 +160,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -350,17 +171,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -369,130 +183,38 @@ } ], "nodes": [ + { "children": [1, 6, 9], "name": "PendulumBalls" }, { - "children": [ - 1, - 4, - 5, - 8 - ], - "extensions": {}, - "name": "PendulumBalls" - }, - { - "children": [ - 2 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [2, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "SliderLine" }, { - "children": [ - 3 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, "name": "SliderLineShape" }, + { "mesh": 0, "name": "SliderLineMesh" }, + { "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, "name": "SliderJoint" }, + { "name": "SliderLineJointAttachment", "translation": [-0.75, 0, 0] }, { - "extensions": {}, - "mesh": 0, - "name": "SliderLineMesh" - }, - { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0, - 1, - 2, - 3 - ], - "nodeA": 5, - "nodeB": 1 - } - }, - "name": "SliderJoint", - "translation": [ - -0.75, - 0.00000000000208164995657567, - 0.00000000000208164995657567 - ] - }, - { - "children": [ - 6 - ], + "children": [7, 4], "extensions": { "OMI_physics_body": { "motion": { - "angularVelocity": [ - 0.0174532998353243, - 0.0174532998353243, - 0.0174532998353243 - ], - "linearVelocity": [ - 1, - 0.00000000000208164995657567, - 0.00000000000208164995657567 - ], + "angularVelocity": [0.0174533, 0.0174533, 0.0174533], + "linearVelocity": [1, 0, 0], "type": "dynamic" } } }, "name": "Ball", - "translation": [ - -0.75, - 0.00000000000208164995657567, - 0.00000000000208164995657567 - ] - }, - { - "children": [ - 7 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "BallShape" + "translation": [-0.75, 0, 0] }, - { - "extensions": {}, - "mesh": 1, - "name": "BallMesh" - }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.00000000000208164995657567, - 1.5 - ] - } + { "children": [8], "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "BallShape" }, + { "mesh": 1, "name": "BallMesh" }, + { "camera": 0, "name": "Camera", "translation": [0, 0, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/slider_ball0.bin b/extensions/2.0/OMI_physics_joint/examples/slider_ball0.bin index c75c0d7..1f928bd 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/slider_ball0.bin and b/extensions/2.0/OMI_physics_joint/examples/slider_ball0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/examples/swing_and_slide.gltf b/extensions/2.0/OMI_physics_joint/examples/swing_and_slide.gltf index 929547c..3fbcccf 100644 --- a/extensions/2.0/OMI_physics_joint/examples/swing_and_slide.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/swing_and_slide.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0.05, - 0.05 - ], - "min": [ - -1, - -0.05, - -0.05 - ], + "max": [1, 0.05, 0.05], + "min": [-1, -0.05, -0.05], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.249717, - 0.25, - 0.249717 - ], - "min": [ - -0.249717, - -0.25, - -0.249717 - ], + "max": [0.249716833233833, 0.25, 0.249716833233833], + "min": [-0.24971683323383, -0.25, -0.24971683323383], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 0.998868, - 1, - 0.998868 - ], - "min": [ - -0.998869, - -1, - -0.998867 - ], + "max": [0.998867988586426, 1, 0.998867988586426], + "min": [-0.99886876344681, -1, -0.99886721372604], "normalized": false, "type": "VEC3" }, @@ -147,28 +85,18 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 12672, - "max": [ - 2209 - ], - "min": [ - 0 - ], + "max": [2209], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -177,16 +105,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.5, - 0.05 - ], - "min": [ - -0.05, - -0.5, - -0.05 - ], + "max": [0.05, 0.5, 0.05], + "min": [-0.05, -0.5, -0.05], "normalized": false, "type": "VEC3" }, @@ -195,18 +115,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -215,16 +125,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -233,188 +135,70 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 14, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 288 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 672 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 960 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 1152 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 1296 - }, - { - "buffer": 0, - "byteLength": 35360, - "byteOffset": 27816 - }, - { - "buffer": 0, - "byteLength": 26520, - "byteOffset": 63176 - }, - { - "buffer": 0, - "byteLength": 17680, - "byteOffset": 89696 - }, - { - "buffer": 0, - "byteLength": 50688, - "byteOffset": 107376 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 158064 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 181464 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 212664 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 236064 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 251664 - } - ], - "buffers": [ - { - "byteLength": 293136, - "uri": "swing_and_slide0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.0500000007450581 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 288, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 288, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 960, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 1152, "target": 34963 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 1224, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 27744, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 63104, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 89624, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 25344, "byteOffset": 107304, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 132648, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 156048, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 187248, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 210648, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 226248, "target": 34963 } ], + "buffers": [{ "byteLength": 246984, "uri": "swing_and_slide0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "box", - "box": { - "size": [2, 0.1, 0.1] - } - }, + "OMI_physics_joint": { + "physicsJoints": [ { - "type": "sphere", - "sphere": { - "radius": 0.25 - } + "limits": [ + { "damping": 1, "linearAxes": [0], "max": 1.75, "min": -0.25, "stiffness": 0.7 }, + { "damping": 1, "linearAxes": [1, 2], "max": 0, "min": 0, "stiffness": 0.7 }, + { "angularAxes": [0, 1], "damping": 1, "max": 0, "min": 0, "stiffness": 0.5 } + ] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "linearAxes": [ - 0 - ], - "lowerLimit": -0.25, - "stiffness": 0.699999988079071, - "upperLimit": 1.75 - }, - { - "linearAxes": [ - 1, - 2 - ], - "stiffness": 0.699999988079071 - }, - { - "angularAxes": [ - 0, - 1 - ], - "stiffness": 0.5 - } + "OMI_physics_shape": { + "shapes": [ + { "box": { "size": [2, 0.1, 0.1] }, "type": "box" }, + { "sphere": { "radius": 0.25 }, "type": "sphere" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -422,12 +206,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -435,12 +214,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -448,17 +222,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -466,17 +233,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -484,17 +244,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 12, - "POSITION": 10, - "TANGENT": 11, - "TEXCOORD_0": 13 - }, + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, "indices": 14, "material": 2, "mode": 4 @@ -503,141 +256,41 @@ } ], "nodes": [ + { "children": [1, 6, 10], "name": "SwingAndSlide" }, { - "children": [ - 1, - 4, - 5, - 9 - ], - "extensions": {}, - "name": "SwingAndSlide" - }, - { - "children": [ - 2 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [2, 4], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "TopBody", - "translation": [ - 0.00000000000208164995657567, - 1, - 0.00000000000208164995657567 - ] + "translation": [0, 1, 0] }, { - "children": [ - 3 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, "name": "TopBodyShape" }, + { "mesh": 0, "name": "TopBodyMesh" }, { - "extensions": {}, - "mesh": 0, - "name": "TopBodyMesh" - }, - { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0, - 1, - 2 - ], - "nodeA": 1, - "nodeB": 5 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, "name": "CustomJoint", - "translation": [ - -0.75, - 1, - 0.00000000000208164995657567 - ] + "translation": [-0.75, 0, 0] }, { - "children": [ - 6, - 8 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, - "name": "Ball", - "rotation": [ - 0.000000000000000094381003489835, - 0.000000000000000227855912687686, - -0.38268345594406, - 0.923879563808441 - ], - "translation": [ - -1.60000002384186, - 0.150000005960464, - 0.00000000000208164995657567 - ] - }, - { - "children": [ - 7 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, - "name": "BallShape" + "name": "BallJointAttachment", + "rotation": [0, 0, 0.38268343236509, 0.923879532511287], + "translation": [0, 1.20208115603438, -0] }, { - "extensions": {}, - "mesh": 1, - "name": "BallMesh" - }, - { - "extensions": {}, - "mesh": 2, - "name": "BallStringMesh", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "children": [7, 9, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, + "name": "Ball", + "rotation": [0, 0, -0.38268343236509, 0.923879532511287], + "translation": [-1.6, 0.15, 0] }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.00000000000208164995657567, - 1.5 - ] - } + { "children": [8], "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "BallShape" }, + { "mesh": 1, "name": "BallMesh" }, + { "mesh": 2, "name": "BallStringMesh", "translation": [0, 0.7, 0] }, + { "camera": 0, "name": "Camera", "translation": [0, 0, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/swing_and_slide0.bin b/extensions/2.0/OMI_physics_joint/examples/swing_and_slide0.bin index 807678c..9f591b5 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/swing_and_slide0.bin and b/extensions/2.0/OMI_physics_joint/examples/swing_and_slide0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/examples/weld_joint.gltf b/extensions/2.0/OMI_physics_joint/examples/weld_joint.gltf index 175356a..b2a98ea 100644 --- a/extensions/2.0/OMI_physics_joint/examples/weld_joint.gltf +++ b/extensions/2.0/OMI_physics_joint/examples/weld_joint.gltf @@ -5,16 +5,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -23,18 +15,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -43,16 +25,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -61,28 +35,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 4, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -91,16 +55,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 0.05, - 0.25, - 0.05 - ], - "min": [ - -0.05, - -0.25, - -0.05 - ], + "max": [0.05, 0.25, 0.05], + "min": [-0.05, -0.25, -0.05], "normalized": false, "type": "VEC3" }, @@ -109,18 +65,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000022, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00002157984454, -1, 1], "normalized": false, "type": "VEC4" }, @@ -129,16 +75,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -147,28 +85,18 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 9, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" }, @@ -177,16 +105,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 0.5, - 0.125, - 0.5 - ], - "min": [ - -0.5, - -0.125, - -0.5 - ], + "max": [0.5, 0.125, 0.5], + "min": [-0.5, -0.125, -0.5], "normalized": false, "type": "VEC3" }, @@ -195,18 +115,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 0, - 1, - 1 - ], - "min": [ - -1, - -0.000015, - -1, - 1 - ], + "max": [1, 0, 1, 1], + "min": [-1, -0.00001525948755, -1, 1], "normalized": false, "type": "VEC4" }, @@ -215,16 +125,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1, - 1 - ], - "min": [ - -1, - -1, - -1 - ], + "max": [1, 1, 1], + "min": [-1, -1, -1], "normalized": false, "type": "VEC3" }, @@ -233,171 +135,73 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, { "bufferView": 14, "byteOffset": 0, - "componentType": 5125, + "componentType": 5123, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" } ], "asset": { - "generator": "Godot Engine v4.1.dev.custom_build@9f12e7b52d944281a39b7d3a33de6700c76cc23a", + "generator": "Godot Engine v4.4.dev.custom_build@1855bc0edb8caa8c7d0ee19f3867674bc7aeb43f", "version": "2.0" }, "bufferViews": [ - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 0 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 23400 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 54600 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 78000 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 93600 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 135072 - }, - { - "buffer": 0, - "byteLength": 31200, - "byteOffset": 158472 - }, - { - "buffer": 0, - "byteLength": 23400, - "byteOffset": 189672 - }, - { - "buffer": 0, - "byteLength": 15600, - "byteOffset": 213072 - }, - { - "buffer": 0, - "byteLength": 41472, - "byteOffset": 228672 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 270144 - }, - { - "buffer": 0, - "byteLength": 384, - "byteOffset": 270432 - }, - { - "buffer": 0, - "byteLength": 288, - "byteOffset": 270816 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 271104 - }, - { - "buffer": 0, - "byteLength": 144, - "byteOffset": 271296 - } - ], - "buffers": [ - { - "byteLength": 271440, - "uri": "weld_joint0.bin" - } - ], - "cameras": [ - { - "perspective": { - "yfov": 1.30899691581726, - "zfar": 4000, - "znear": 0.05 - }, - "type": "perspective" - } + { "buffer": 0, "byteLength": 23400, "byteOffset": 0, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 23400, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 54600, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 78000, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 93600, "target": 34963 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 114336, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 31200, "byteOffset": 137736, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 23400, "byteOffset": 168936, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 15600, "byteOffset": 192336, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 20736, "byteOffset": 207936, "target": 34963 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 228672, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 228960, "byteStride": 16, "target": 34962 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 229344, "byteStride": 12, "target": 34962 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 229632, "byteStride": 8, "target": 34962 }, + { "buffer": 0, "byteLength": 72, "byteOffset": 229824, "target": 34963 } ], + "buffers": [{ "byteLength": 229896, "uri": "weld_joint0.bin" }], + "cameras": [{ "perspective": { "yfov": 1.30899693899575, "zfar": 4000, "znear": 0.05 }, "type": "perspective" }], "extensions": { - "OMI_physics_shape": { - "shapes": [ - { - "type": "capsule", - "capsule": { - "height": 0.5, - "radius": 0.05 - } - }, + "OMI_physics_joint": { + "physicsJoints": [ { - "type": "box", - "box": { - "size": [1, 0.25, 1] - } + "limits": [ + { + "angularAxes": [0, 1, 2], + "linearAxes": [0, 1, 2], + "max": 0.0, + "min": 0.0 + } + ] } ] }, - "OMI_physics_joint": { - "constraints": [ - { - "linearAxes": [0, 1, 2], - "angularAxes": [0, 1, 2] - } + "OMI_physics_shape": { + "shapes": [ + { "capsule": { "height": 0.5, "radius": 0.05 }, "type": "capsule" }, + { "box": { "size": [1, 0.25, 1] }, "type": "box" } ] } }, - "extensionsUsed": [ - "OMI_physics_body", - "OMI_physics_joint", - "OMI_physics_shape" - ], + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -405,12 +209,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -418,12 +217,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -431,17 +225,10 @@ ], "meshes": [ { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 2, - "POSITION": 0, - "TANGENT": 1, - "TEXCOORD_0": 3 - }, + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, "indices": 4, "material": 0, "mode": 4 @@ -449,17 +236,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 7, - "POSITION": 5, - "TANGENT": 6, - "TEXCOORD_0": 8 - }, + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, "indices": 9, "material": 1, "mode": 4 @@ -467,17 +247,10 @@ ] }, { - "extras": { - "targetNames": [] - }, + "extras": { "targetNames": [] }, "primitives": [ { - "attributes": { - "NORMAL": 12, - "POSITION": 10, - "TANGENT": 11, - "TEXCOORD_0": 13 - }, + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, "indices": 14, "material": 2, "mode": 4 @@ -486,126 +259,55 @@ } ], "nodes": [ + { "children": [1, 6, 9, 12], "name": "SimpleJoint" }, { - "children": [1, 4, 5, 8, 11], - "extensions": {}, - "name": "SimpleJoint" - }, - { - "children": [2], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [2, 4], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "BodyA", - "rotation": [0.000859406718518585, 0.000151536631165072, -0.17364810407162, 0.984807372093201], - "translation": [-0.45, 0.68, 0.0] + "rotation": [0.000859405839545685, 0.000151536803063495, -0.17364822240133, 0.984807358479341], + "translation": [-0.45, 0.68, 0] }, { "children": [3], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "ShapeA", - "rotation": [0.0, 0.0, 0.70710676908493, 0.70710676908493] - }, - { - "extensions": {}, - "mesh": 0, - "name": "MeshA" + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "ColliderA", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 0, "name": "MeshA" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [0], - "nodeA": 1, - "nodeB": 5 - } - }, + "extensions": { "OMI_physics_joint": { "connectedNode": 5, "joint": 0 } }, "name": "WeldJoint", - "translation": [-0.23, 0.6, 0.0] + "rotation": [-0.00085940619258, -0.0001515369515, 0.17364831818905, 0.984807341589035], + "translation": [0.234093832718915, 0.0000691890850380017, 0.000139626308625482] }, + { "name": "BodyBJointAttachment", "translation": [-0.23, 0, 0] }, { - "children": [ - 6 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "dynamic" - } - } - }, + "children": [7, 5], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "BodyB", - "translation": [0.0, 0.6, 0.0] + "translation": [0, 0.6, 0] }, { - "children": [ - 7 - ], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 0 - } - } - }, - "name": "ShapeB", - "rotation": [0.0, 0.0, 0.70710676908493, 0.70710676908493] + "children": [8], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, + "name": "ColliderB", + "rotation": [0, 0, 0.707106796640861, 0.707106765732234] }, + { "mesh": 1, "name": "MeshB" }, { - "extensions": {}, - "mesh": 1, - "name": "MeshB" - }, - { - "children": [ - 9 - ], - "extensions": { - "OMI_physics_body": { - "motion": { - "type": "static" - } - } - }, + "children": [10], + "extensions": { "OMI_physics_body": { "motion": { "type": "static" } } }, "name": "FloorBody", - "translation": [0.1, 0.0, 0.0] + "translation": [0.1, 0, 0] }, { - "children": [10], - "extensions": { - "OMI_physics_body": { - "collider": { - "shape": 1 - } - } - }, + "children": [11], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "FloorShape" }, - { - "extensions": {}, - "mesh": 2, - "name": "FloorMesh" - }, - { - "camera": 0, - "extensions": {}, - "name": "Camera", - "translation": [0.0, 0.5, 1.5] - } + { "mesh": 2, "name": "FloorMesh" }, + { "camera": 0, "name": "Camera", "translation": [0, 0.5, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [0] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/extensions/2.0/OMI_physics_joint/examples/weld_joint0.bin b/extensions/2.0/OMI_physics_joint/examples/weld_joint0.bin index e55afe0..0f549b7 100644 Binary files a/extensions/2.0/OMI_physics_joint/examples/weld_joint0.bin and b/extensions/2.0/OMI_physics_joint/examples/weld_joint0.bin differ diff --git a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.drive.schema.json b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.drive.schema.json new file mode 100644 index 0000000..8f3cab7 --- /dev/null +++ b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.drive.schema.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "glTF.OMI_physics_joint.drive.schema.json", + "title": "OMI_physics_joint Physics Joint Drive", + "type": "object", + "description": "Parameters describing a drive or motor which applies forces within a joint.", + "allOf": [ { "$ref": "glTFProperty.schema.json" } ], + "properties": { + "type": { + "description": "Determines the degree of freedom which this drive controls.", + "anyOf": [ + { + "const": "linear", + "description": "The drive applies a linear force along the driven axis." + }, + { + "const": "angular", + "description": "The drive applies a torque about the driven axis." + }, + { + "type": "string" + } + ] + }, + "mode": { + "description": "Specifies the force calculation mode.", + "anyOf": [ + { + "const": "force", + "description": "Value computed from the spring equation is the force to apply along the axis." + }, + { + "const": "acceleration", + "description": "Value computed from the spring equation is the acceleration to apply along the axis." + }, + { + "type": "string" + } + ] + }, + "axis": { + "type": "integer", + "minimum": 0, + "maximum": 2, + "description": "The index of the axis which this drive applies forces on." + }, + "maxForce": { + "type": "number", + "description": "The maximum force (or torque, for angular drives) the drive can apply. If not provided, this drive is not force-limited.", + "minimum": 0 + }, + "positionTarget": { + "type": "number", + "description": "The target translation/angle along the axis that this drive attempts to achieve." + }, + "velocityTarget": { + "type": "number", + "description": "The target velocity along/about the axis that this drive attempts to achieve." + }, + "stiffness": { + "type": "number", + "description": "The stiffness of the drive, scaling the force based on the position target.", + "default": 0, + "minimum": 0 + }, + "damping": { + "type": "number", + "description": "The damping of the drive, scaling the force based on the velocity target.", + "default": 0, + "minimum": 0 + } + }, + "required": [ + "type", + "mode", + "axis" + ] +} diff --git a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.limit.schema.json b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.limit.schema.json new file mode 100644 index 0000000..2983aae --- /dev/null +++ b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.limit.schema.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "glTF.OMI_physics_joint.limit.schema.json", + "title": "OMI_physics_joint Physics Joint Limit", + "type": "object", + "description": "Parameters describing how a joint constrains the relative motion of a pair of nodes.", + "allOf": [ { "$ref": "glTFProperty.schema.json" } ], + "properties": { + "linearAxes": { + "description": "The indices of the linear axes which are limited, constraining the linear motion in 1, 2 or 3 dimensions. 1D keeps an object some distance from an infinite plane. 2D keeps an object some distance from an infinite line. 3D keeps an object some distance from a point. Can only contain 0 (X), 1 (Y), or 2 (Z), so [0, 1, 2] constrains all three axes.", + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 2 + }, + "minItems": 0, + "maxItems": 3, + "uniqueItems": true + }, + "angularAxes": { + "description": "The indices of the angular axes which are limited, constraining the angular motion in 1, 2 or 3 dimensions. 1D limits rotation about one axis (e.g. a universal joint). 2D limits rotation about two axes (e.g. a cone). 3D limits rotation about all three axes. Can only contain 0 (X), 1 (Y), or 2 (Z), so [0, 1, 2] constrains all three axes.", + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 2 + }, + "minItems": 0, + "maxItems": 3, + "uniqueItems": true + }, + "min": { + "type": "number", + "description": "The minimum of the allowed range of relative distance in meters, or angle in radians. If not specified, the minimum is unbounded (negative infinity). At least one of min or max should be present, or the limit is useless." + }, + "max": { + "type": "number", + "description": "The maximum of the allowed range of relative distance in meters, or angle in radians. If not specified, the maximum is unbounded (positive infinity). At least one of min or max should be present, or the limit is useless." + }, + "stiffness": { + "type": "number", + "description": "The stiffness strength used to calculate a restorative force when the joint is extended beyond the limit. If not present, the limit should be infinitely stiff.", + "minimum": 0.0 + }, + "damping": { + "type": "number", + "description": "Damping applied to the velocity when the joint is extended beyond the limit.", + "minimum": 0.0, + "default": 0.0 + }, + "extensions": { }, + "extras": { } + }, + "oneOf": [ + { + "required": ["linearAxes"] + }, + { + "required": ["angularAxes"] + } + ] +} diff --git a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.schema.json b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.schema.json new file mode 100644 index 0000000..9f44e08 --- /dev/null +++ b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint.schema.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "glTF.OMI_physics_joint.schema.json", + "title": "OMI_physics_joint Physics Joint Settings", + "type": "object", + "description": "Parameters describing joint settings, which may be referenced by nodes to constrain or drive the relative motion of pairs of nodes.", + "allOf": [ { "$ref": "glTFChildOfRootProperty.schema.json" } ], + "properties": { + "limits": { + "type": "array", + "description": "The set of limits which constrain relative motion between a pair of nodes.", + "items": { + "type": "object", + "$ref": "glTF.OMI_physics_joint.joint.limit.schema.json" + } + }, + "drives": { + "type": "array", + "description": "The set of drives applying forces to this joint. Drives include motors and springs.", + "items": { + "type": "object", + "$ref": "glTF.OMI_physics_joint.joint.drive.schema.json" + } + }, + "extensions": { }, + "extras": { } + } +} diff --git a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint_constraint.schema.json b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint_constraint.schema.json deleted file mode 100644 index dc3d8d3..0000000 --- a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.joint_constraint.schema.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "glTF.OMI_physics_joint.joint_constraint.schema.json", - "title": "OMI_physics_joint Joint Constraint", - "type": "object", - "description": "Parameters describing a physics joint constraint / limit.", - "allOf": [ { "$ref": "glTFProperty.schema.json" } ], - "properties": { - "linearAxes": { - "type": "array", - "description": "The linear axes to constrain. Can only contain 0 (X), 1 (Y), or 2 (Z).", - "default": [] - }, - "angularAxes": { - "type": "array", - "description": "The angular axes to constrain. Can only contain 0 (X), 1 (Y), or 2 (Z).", - "default": [] - }, - "lowerLimit": { - "type": "number", - "description": "The lower limit of the constraint, in meters or radians.", - "default": 0.0 - }, - "upperLimit": { - "type": "number", - "description": "The upper limit of the constraint, in meters or radians.", - "default": 0.0 - }, - "stiffness": { - "type": "number", - "description": "When beyond the limits, the stiffness of springing back.", - "default": "Infinity" - }, - "damping": { - "type": "number", - "description": "When beyond the limits, the damping of the springing back motion.", - "default": 1.0 - }, - "extensions": { }, - "extras": { } - } -} diff --git a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.schema.json b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.schema.json index 50af464..1b5a706 100644 --- a/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.schema.json +++ b/extensions/2.0/OMI_physics_joint/schema/glTF.OMI_physics_joint.schema.json @@ -3,15 +3,15 @@ "$id": "glTF.OMI_physics_joint.schema.json", "title": "OMI_physics_joint glTF Document Extension", "type": "object", - "description": "Top level joint resources.", + "description": "Top level physics joint settings.", "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { - "constraints": { - "description": "An array of physics joint constraints that can be referenced by nodes.", + "physicsJoints": { "type": "array", + "description": "An array of physics joint settings.", "items": { "type": "object", - "$ref": "joint_constraint.schema.json" + "$ref": "glTF.OMI_physics_joint.joint.schema.json" }, "minItems": 1 }, diff --git a/extensions/2.0/OMI_physics_joint/schema/node.OMI_physics_joint.schema.json b/extensions/2.0/OMI_physics_joint/schema/node.OMI_physics_joint.schema.json index 37ee9d6..3ba464d 100644 --- a/extensions/2.0/OMI_physics_joint/schema/node.OMI_physics_joint.schema.json +++ b/extensions/2.0/OMI_physics_joint/schema/node.OMI_physics_joint.schema.json @@ -1,34 +1,26 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "node.OMI_physics_joint.schema.json", - "title": "OMI_physics_joint glTF Node Extension", + "title": "OMI_physics_joint Node Joint Property", "type": "object", - "description": "Node extension that references a physics joint.", + "description": "Parameters describing how the relative motion of a pair of nodes is constrained.", "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { - "constraints": { - "description": "An array of ids of joint constraints that are applied to the node.", - "type": "array", - "items": { - "type": "number", - "$ref": "glTFid.schema.json" - }, - "minItems": 1 + "connectedNode": { + "allOf": [ { "$ref": "glTFid.schema.json" } ], + "description": "The index of the node to which this is connected." }, - "nodeA": { - "description": "The id of the first node.", - "type": "number", - "$ref": "glTFid.schema.json" + "joint": { + "allOf": [ { "$ref": "glTFid.schema.json" } ], + "description": "The index of the joint settings in the top level physicsJoints array." }, - "nodeB": { - "description": "The id of the second node.", - "type": "number", - "$ref": "glTFid.schema.json" + "enableCollision": { + "type": "boolean", + "description": "If true, allow the connected objects to collide. Connected objects do not collide by default.", + "default": false }, "extensions": { }, "extras": { } }, - "required": [ - "constraints" - ] + "required": ["connectedNode", "joint"] }