diff --git a/README.md b/README.md index bf45130..30d7878 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ Extensions implemented in this repository: Extensions implemented upstream in Godot Engine: -| Extension name | Import | Export | Godot version | Link | -| -------------------- | ------ | ------ | ------------- | ------------------------------------------------------------------------------------------------------------------------ | -| **OMI_collider** | Yes | Yes | 4.1+ or 3.6+ | [OMI_collider extension spec](https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_collider) | -| **OMI_physics_body** | Yes | Yes | 4.1+ or 3.6+ | [OMI_physics_body extension spec](https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body) | +| Extension name | Import | Export | Godot version | Link | +| --------------------- | ------ | ------ | ------------- | -------------------------------------------------------------------------------------------------------------------------- | +| **OMI_collider** | Yes | Yes | 4.1+ or 3.6+ | [OMI_collider extension spec](https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/Archived/OMI_collider) | +| **OMI_physics_body** | Yes | Yes | 4.1+ or 3.6+ | [OMI_physics_body extension spec](https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body) | +| **OMI_physics_shape** | Yes | Yes | 4.3+ | [OMI_physics_shape extension spec](https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_shape) | diff --git a/examples/omi_physics_body/gltf/ball_pit.gltf b/examples/omi_physics_body/gltf/ball_pit.gltf new file mode 100644 index 0000000..4d8b4bf --- /dev/null +++ b/examples/omi_physics_body/gltf/ball_pit.gltf @@ -0,0 +1,882 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [4, 0.05, 4], + "min": [-4, -0.05, -4], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.000015, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 2, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 3, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 4, + "byteOffset": 0, + "componentType": 5125, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 5, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.05, 0.5, 4], + "min": [-0.05, -0.5, -4], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 6, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.000015, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 7, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 8, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 9, + "byteOffset": 0, + "componentType": 5125, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 10, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.05, 0.5, 4], + "min": [-0.05, -0.5, -4], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 11, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.000015, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 12, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 13, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 14, + "byteOffset": 0, + "componentType": 5125, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 15, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [4, 0.5, 0.05], + "min": [-4, -0.5, -0.05], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 16, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.000015, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 17, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 18, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 19, + "byteOffset": 0, + "componentType": 5125, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 20, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.499434, 0.5, 0.499434], + "min": [-0.499434, -0.5, -0.499434], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 21, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 0, 1, 1], + "min": [-1, -0.000022, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 22, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 23, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 24, + "byteOffset": 0, + "componentType": 5125, + "count": 12672, + "max": [2209], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 25, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.499434, 0.5, 0.499434], + "min": [-0.499434, -0.5, -0.499434], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 26, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 0, 1, 1], + "min": [-1, -0.000022, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 27, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 28, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 29, + "byteOffset": 0, + "componentType": 5125, + "count": 12672, + "max": [2209], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 30, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.499434, 0.5, 0.499434], + "min": [-0.499434, -0.5, -0.499434], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 31, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 0, 1, 1], + "min": [-1, -0.000022, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 32, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 33, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 34, + "byteOffset": 0, + "componentType": 5125, + "count": 12672, + "max": [2209], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 35, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.499434, 0.5, 0.499434], + "min": [-0.499434, -0.5, -0.499434], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 36, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 0, 1, 1], + "min": [-1, -0.000022, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 37, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 38, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 39, + "byteOffset": 0, + "componentType": 5125, + "count": 12672, + "max": [2209], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 40, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.499434, 0.5, 0.499434], + "min": [-0.499434, -0.5, -0.499434], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 41, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 0, 1, 1], + "min": [-1, -0.000022, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 42, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [0.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 43, + "byteOffset": 0, + "componentType": 5126, + "count": 2210, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 44, + "byteOffset": 0, + "componentType": 5125, + "count": 12672, + "max": [2209], + "min": [0], + "normalized": false, + "type": "SCALAR" + } + ], + "asset": { + "generator": "Godot Engine v4.3.dev.custom_build@63b13fec6a1ee9fc9b45985377219b33a41a3954", + "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": 288, "byteOffset": 1296 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 1584 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 1968 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 2256 }, + { "buffer": 0, "byteLength": 144, "byteOffset": 2448 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 2592 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 2880 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 3264 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 3552 }, + { "buffer": 0, "byteLength": 144, "byteOffset": 3744 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 3888 }, + { "buffer": 0, "byteLength": 384, "byteOffset": 4176 }, + { "buffer": 0, "byteLength": 288, "byteOffset": 4560 }, + { "buffer": 0, "byteLength": 192, "byteOffset": 4848 }, + { "buffer": 0, "byteLength": 144, "byteOffset": 5040 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 5184 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 31704 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 67064 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 93584 }, + { "buffer": 0, "byteLength": 50688, "byteOffset": 111264 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 161952 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 188472 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 223832 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 250352 }, + { "buffer": 0, "byteLength": 50688, "byteOffset": 268032 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 318720 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 345240 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 380600 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 407120 }, + { "buffer": 0, "byteLength": 50688, "byteOffset": 424800 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 475488 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 502008 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 537368 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 563888 }, + { "buffer": 0, "byteLength": 50688, "byteOffset": 581568 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 632256 }, + { "buffer": 0, "byteLength": 35360, "byteOffset": 658776 }, + { "buffer": 0, "byteLength": 26520, "byteOffset": 694136 }, + { "buffer": 0, "byteLength": 17680, "byteOffset": 720656 }, + { "buffer": 0, "byteLength": 50688, "byteOffset": 738336 } + ], + "buffers": [{ "byteLength": 789024, "uri": "ball_pit0.bin" }], + "cameras": [ + { + "perspective": { "yfov": 1.30899691581726, "zfar": 4000, "znear": 0.0500000007450581 }, + "type": "perspective" + } + ], + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { "box": { "size": [8, 0.100000001490116, 8] }, "type": "box" }, + { "box": { "size": [0.100000001490116, 1, 8] }, "type": "box" }, + { "box": { "size": [8, 1, 0.100000001490116] }, "type": "box" }, + { "sphere": { "radius": 0.5 }, "type": "sphere" } + ] + } + }, + "extensionsUsed": ["GODOT_single_root", "OMI_physics_body", "OMI_physics_shape"], + "materials": [ + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + }, + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + } + ], + "meshes": [ + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 2, "POSITION": 0, "TANGENT": 1, "TEXCOORD_0": 3 }, + "indices": 4, + "material": 0, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 7, "POSITION": 5, "TANGENT": 6, "TEXCOORD_0": 8 }, + "indices": 9, + "material": 1, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 12, "POSITION": 10, "TANGENT": 11, "TEXCOORD_0": 13 }, + "indices": 14, + "material": 2, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 17, "POSITION": 15, "TANGENT": 16, "TEXCOORD_0": 18 }, + "indices": 19, + "material": 3, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 22, "POSITION": 20, "TANGENT": 21, "TEXCOORD_0": 23 }, + "indices": 24, + "material": 4, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 27, "POSITION": 25, "TANGENT": 26, "TEXCOORD_0": 28 }, + "indices": 29, + "material": 5, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 32, "POSITION": 30, "TANGENT": 31, "TEXCOORD_0": 33 }, + "indices": 34, + "material": 6, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 37, "POSITION": 35, "TANGENT": 36, "TEXCOORD_0": 38 }, + "indices": 39, + "material": 7, + "mode": 4 + } + ] + }, + { + "extras": { "targetNames": [] }, + "primitives": [ + { + "attributes": { "NORMAL": 42, "POSITION": 40, "TANGENT": 41, "TEXCOORD_0": 43 }, + "indices": 44, + "material": 8, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "children": [1, 10, 13, 16, 19, 22, 25], + "name": "BallPit" + }, + { + "children": [2, 4, 6, 8], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "static" } + } + }, + "name": "Pit" + }, + { + "children": [3], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 0 } + } + }, + "name": "Floor" + }, + { + "mesh": 0, + "name": "Mesh1" + }, + { + "children": [5], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 1 } + } + }, + "name": "WallEast", + "translation": [4, 0.5, 0] + }, + { + "mesh": 1, + "name": "Mesh2" + }, + { + "children": [7], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 1 } + } + }, + "name": "WallWest", + "translation": [-4, 0.5, 0] + }, + { + "mesh": 2, + "name": "Mesh3" + }, + { + "children": [9], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 2 } + } + }, + "name": "WallNorth", + "translation": [0, 0.5, -4] + }, + { + "mesh": 3, + "name": "Mesh4" + }, + { + "children": [11], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "dynamic" } + } + }, + "name": "Ball1", + "translation": [0, 1, 0] + }, + { + "children": [12], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 3 } + } + }, + "name": "SphereShape1" + }, + { + "mesh": 4, + "name": "BallMesh1" + }, + { + "children": [14], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "dynamic" } + } + }, + "name": "Ball2", + "translation": [0.5, 2, 0.5] + }, + { + "children": [15], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 3 } + } + }, + "name": "SphereShape2" + }, + { + "mesh": 5, + "name": "BallMesh2" + }, + { + "children": [17], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "dynamic" } + } + }, + "name": "Ball3", + "translation": [-0.5, 2.5, 0] + }, + { + "children": [18], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 3 } + } + }, + "name": "SphereShape3" + }, + { + "mesh": 6, + "name": "BallMesh3" + }, + { + "children": [20], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "dynamic" } + } + }, + "name": "Ball4", + "translation": [0.25, 3.5, 0] + }, + { + "children": [21], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 3 } + } + }, + "name": "SphereShape4" + }, + { + "mesh": 7, + "name": "BallMesh4" + }, + { + "children": [23], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "dynamic" } + } + }, + "name": "Ball5", + "translation": [-0.5, 4, -0.5] + }, + { + "children": [24], + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 3 } + } + }, + "name": "SphereShape5" + }, + { + "mesh": 8, + "name": "BallMesh5" + }, + { + "camera": 0, + "name": "Camera", + "rotation": [-0.25881916284561, 0, 0, 0.965925812721252], + "translation": [0, 3, 6] + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/ball_pit.gltf.import b/examples/omi_physics_body/gltf/ball_pit.gltf.import new file mode 100644 index 0000000..6dc59fd --- /dev/null +++ b/examples/omi_physics_body/gltf/ball_pit.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://diapqybopv4bm" +path="res://.godot/imported/ball_pit.gltf-1323bff07f27fb405cca075239dee184.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/ball_pit.gltf" +dest_files=["res://.godot/imported/ball_pit.gltf-1323bff07f27fb405cca075239dee184.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/ball_pit0.bin b/examples/omi_physics_body/gltf/ball_pit0.bin new file mode 100644 index 0000000..371e754 Binary files /dev/null and b/examples/omi_physics_body/gltf/ball_pit0.bin differ diff --git a/examples/omi_physics_body/gltf/collider_trigger_same_node.gltf b/examples/omi_physics_body/gltf/collider_trigger_same_node.gltf new file mode 100644 index 0000000..567565f --- /dev/null +++ b/examples/omi_physics_body/gltf/collider_trigger_same_node.gltf @@ -0,0 +1,35 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 1, 1] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + }, + "trigger": { + "shape": 0 + } + } + }, + "name": "ColliderTriggerSameNode" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/collider_trigger_same_node.gltf.import b/examples/omi_physics_body/gltf/collider_trigger_same_node.gltf.import new file mode 100644 index 0000000..f915ba9 --- /dev/null +++ b/examples/omi_physics_body/gltf/collider_trigger_same_node.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://8m2uj4ro8x41" +path="res://.godot/imported/collider_trigger_same_node.gltf-b3250b17a3a252c43434310d75fe5b49.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/collider_trigger_same_node.gltf" +dest_files=["res://.godot/imported/collider_trigger_same_node.gltf-b3250b17a3a252c43434310d75fe5b49.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/dynamic_box.gltf b/examples/omi_physics_body/gltf/dynamic_box.gltf new file mode 100644 index 0000000..3a04905 --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_box.gltf @@ -0,0 +1,43 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 2, 3] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "children": [1], + "extensions": { + "OMI_physics_body": { + "motion": { + "type": "dynamic" + } + } + }, + "name": "DynamicBox" + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "BoxShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/dynamic_box.gltf.import b/examples/omi_physics_body/gltf/dynamic_box.gltf.import new file mode 100644 index 0000000..8ed3b34 --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_box.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://csff8bg7tcdep" +path="res://.godot/imported/dynamic_box.gltf-5b69ed8587ba51a35d135c583a8226a2.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/dynamic_box.gltf" +dest_files=["res://.godot/imported/dynamic_box.gltf-5b69ed8587ba51a35d135c583a8226a2.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf b/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf new file mode 100644 index 0000000..5ea590a --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf @@ -0,0 +1,45 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "sphere", + "sphere": { + "radius": 0.5 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "children": [1], + "extensions": { + "OMI_physics_body": { + "motion": { + "angularVelocity": [4, 5, 6], + "linearVelocity": [1, 2, 3], + "type": "dynamic" + } + } + }, + "name": "DynamicWithVelocity" + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "SphereShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf.import b/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf.import new file mode 100644 index 0000000..7f24f18 --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://eg861a2cj7dh" +path="res://.godot/imported/dynamic_with_velocity.gltf-0ac6bbf5b18dabc361be1b05e27ae9df.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/dynamic_with_velocity.gltf" +dest_files=["res://.godot/imported/dynamic_with_velocity.gltf-0ac6bbf5b18dabc361be1b05e27ae9df.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/indirect_children.gltf b/examples/omi_physics_body/gltf/indirect_children.gltf new file mode 100644 index 0000000..7898b23 --- /dev/null +++ b/examples/omi_physics_body/gltf/indirect_children.gltf @@ -0,0 +1,129 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 1, 1] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_shape", "OMI_physics_body"], + "nodes": [ + { + "children": [1, 3, 5, 8, 11, 12], + "name": "IndirectColliders" + }, + { + "children": [2], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "kinematic" } + } + }, + "name": "KinematicDirect", + "translation": [0, 0, 0] + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 0 } + } + }, + "name": "BoxShapeKinematicDirect" + }, + { + "children": [4], + "extensions": { + "OMI_physics_body": { + "trigger": { + "nodes": [4] + } + } + }, + "name": "TriggerDirect", + "translation": [0, 0, -2] + }, + { + "extensions": { + "OMI_physics_body": { + "trigger": { "shape": 0 } + } + }, + "name": "BoxShapeTriggerDirect" + }, + { + "children": [6], + "extensions": { + "OMI_physics_body": { + "motion": { "type": "kinematic" } + } + }, + "name": "KinematicIndirect", + "translation": [-2, 0, 0] + }, + { + "children": [7], + "name": "IntermediaryNodeKinematic" + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { "shape": 0 } + } + }, + "name": "BoxShapeKinematicIndirect" + }, + { + "children": [9], + "extensions": { + "OMI_physics_body": { + "trigger": { + "nodes": [10] + } + } + }, + "name": "TriggerIndirect", + "translation": [-2, 0, -2] + }, + { + "children": [10], + "name": "IntermediaryNodeTrigger" + }, + { + "extensions": { + "OMI_physics_body": { + "trigger": { "shape": 0 } + } + }, + "name": "BoxShapeTriggerIndirect" + }, + { + "extensions": { + "OMI_physics_body": { + "motion": { "type": "kinematic" }, + "collider": { "shape": 0 } + } + }, + "name": "KinematicSameNode", + "translation": [2, 0, 0] + }, + { + "extensions": { + "OMI_physics_body": { + "trigger": { "shape": 0 } + } + }, + "name": "TriggerSameNode", + "translation": [2, 0, -2] + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/indirect_children.gltf.import b/examples/omi_physics_body/gltf/indirect_children.gltf.import new file mode 100644 index 0000000..4a1d925 --- /dev/null +++ b/examples/omi_physics_body/gltf/indirect_children.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cmkrpebetoacu" +path="res://.godot/imported/indirect_children.gltf-732825a49ea5683e414178c5e7d87530.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/indirect_children.gltf" +dest_files=["res://.godot/imported/indirect_children.gltf-732825a49ea5683e414178c5e7d87530.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/static_body_motion.gltf b/examples/omi_physics_body/gltf/static_body_motion.gltf new file mode 100644 index 0000000..8f291e5 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_body_motion.gltf @@ -0,0 +1,43 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 2, 3] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "children": [1], + "extensions": { + "OMI_physics_body": { + "motion": { + "type": "static" + } + } + }, + "name": "StaticBodyMotion" + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "BoxShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/static_body_motion.gltf.import b/examples/omi_physics_body/gltf/static_body_motion.gltf.import new file mode 100644 index 0000000..336f856 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_body_motion.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bk4ahwprt8u55" +path="res://.godot/imported/static_body_motion.gltf-8dc66b64c185dafde9ba74170c5aedf7.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/static_body_motion.gltf" +dest_files=["res://.godot/imported/static_body_motion.gltf-8dc66b64c185dafde9ba74170c5aedf7.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/static_compound_collider.gltf b/examples/omi_physics_body/gltf/static_compound_collider.gltf new file mode 100644 index 0000000..caa5282 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_compound_collider.gltf @@ -0,0 +1,41 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 2, 3] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "children": [1], + "extensions": { + "OMI_physics_body": { + "collider": {} + } + }, + "name": "StaticCompoundCollider" + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "BoxShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/static_compound_collider.gltf.import b/examples/omi_physics_body/gltf/static_compound_collider.gltf.import new file mode 100644 index 0000000..93ccf11 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_compound_collider.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://h0212o0d4n14" +path="res://.godot/imported/static_compound_collider.gltf-c162960baaf09d9b5e2c18a15de8530d.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/static_compound_collider.gltf" +dest_files=["res://.godot/imported/static_compound_collider.gltf-c162960baaf09d9b5e2c18a15de8530d.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/static_with_trigger.gltf b/examples/omi_physics_body/gltf/static_with_trigger.gltf new file mode 100644 index 0000000..97c14a9 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_with_trigger.gltf @@ -0,0 +1,59 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 1, 1] + } + }, + { + "type": "sphere", + "sphere": { + "radius": 2 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "children": [1, 2], + "extensions": { + "OMI_physics_body": { + "motion": { + "type": "static" + } + } + }, + "name": "StaticBox" + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "StaticShape" + }, + { + "extensions": { + "OMI_physics_body": { + "trigger": { + "shape": 1 + } + } + }, + "name": "TriggerShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/static_with_trigger.gltf.import b/examples/omi_physics_body/gltf/static_with_trigger.gltf.import new file mode 100644 index 0000000..ef6f000 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_with_trigger.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cki1lq1s1vy8a" +path="res://.godot/imported/static_with_trigger.gltf-667972f389c6f7fb86ac0baf389ef2e4.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/static_with_trigger.gltf" +dest_files=["res://.godot/imported/static_with_trigger.gltf-667972f389c6f7fb86ac0baf389ef2e4.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/trigger_box.gltf b/examples/omi_physics_body/gltf/trigger_box.gltf new file mode 100644 index 0000000..7cc6aec --- /dev/null +++ b/examples/omi_physics_body/gltf/trigger_box.gltf @@ -0,0 +1,32 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 1, 1] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "trigger": { + "shape": 0 + } + } + }, + "name": "TriggerBox" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/trigger_box.gltf.import b/examples/omi_physics_body/gltf/trigger_box.gltf.import new file mode 100644 index 0000000..069a03d --- /dev/null +++ b/examples/omi_physics_body/gltf/trigger_box.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bvllmy33slra1" +path="res://.godot/imported/trigger_box.gltf-c695f28cce61131ad977569d6b6f184a.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/trigger_box.gltf" +dest_files=["res://.godot/imported/trigger_box.gltf-c695f28cce61131ad977569d6b6f184a.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/gltf/two_boxes.gltf b/examples/omi_physics_body/gltf/two_boxes.gltf new file mode 100644 index 0000000..77005d9 --- /dev/null +++ b/examples/omi_physics_body/gltf/two_boxes.gltf @@ -0,0 +1,71 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 1, 1] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_shape", "OMI_physics_body"], + "nodes": [ + { + "children": [1, 3], + "extensions": {}, + "name": "TwoBoxes" + }, + { + "children": [2], + "extensions": { + "OMI_physics_body": { + "motion": { + "type": "static" + } + } + }, + "name": "StaticBody", + "translation": [-1, 0, 0] + }, + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "StaticBoxShape" + }, + { + "children": [4], + "extensions": { + "OMI_physics_body": { + "trigger": { + "nodes": [4] + } + } + }, + "name": "TriggerBody", + "translation": [1, 0, 0] + }, + { + "extensions": { + "OMI_physics_body": { + "trigger": { + "shape": 0 + } + } + }, + "name": "TriggerBoxShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/gltf/two_boxes.gltf.import b/examples/omi_physics_body/gltf/two_boxes.gltf.import new file mode 100644 index 0000000..d94e838 --- /dev/null +++ b/examples/omi_physics_body/gltf/two_boxes.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bwge2lbkxrt1r" +path="res://.godot/imported/two_boxes.gltf-d0996b8ef2c81417dced04500a8970d7.scn" + +[deps] + +source_file="res://examples/omi_physics_body/gltf/two_boxes.gltf" +dest_files=["res://.godot/imported/two_boxes.gltf-d0996b8ef2c81417dced04500a8970d7.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_body/source/ball_pit.tscn b/examples/omi_physics_body/source/ball_pit.tscn new file mode 100644 index 0000000..1abf80f --- /dev/null +++ b/examples/omi_physics_body/source/ball_pit.tscn @@ -0,0 +1,111 @@ +[gd_scene load_steps=11 format=3 uid="uid://dqilfsh6xykgu"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_fhcmv"] +size = Vector3(8, 0.1, 8) + +[sub_resource type="BoxMesh" id="BoxMesh_8kmfa"] +size = Vector3(8, 0.1, 8) + +[sub_resource type="BoxShape3D" id="BoxShape3D_0c2du"] +size = Vector3(0.1, 1, 8) + +[sub_resource type="BoxMesh" id="BoxMesh_5pmlq"] +size = Vector3(0.1, 1, 8) + +[sub_resource type="BoxShape3D" id="BoxShape3D_vahxc"] +size = Vector3(8, 1, 0.1) + +[sub_resource type="BoxMesh" id="BoxMesh_tfqct"] +size = Vector3(8, 1, 0.1) + +[sub_resource type="SphereShape3D" id="SphereShape3D_w5jpo"] + +[sub_resource type="SphereMesh" id="SphereMesh_pwtuc"] + +[sub_resource type="SphereShape3D" id="SphereShape3D_oldn1"] + +[sub_resource type="SphereShape3D" id="SphereShape3D_fva84"] + +[node name="BallPit" type="Node3D"] + +[node name="Pit" type="StaticBody3D" parent="."] + +[node name="Floor" type="CollisionShape3D" parent="Pit"] +shape = SubResource("BoxShape3D_fhcmv") + +[node name="Mesh1" type="MeshInstance3D" parent="Pit/Floor"] +mesh = SubResource("BoxMesh_8kmfa") +skeleton = NodePath("../..") + +[node name="WallEast" type="CollisionShape3D" parent="Pit"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 0.5, 0) +shape = SubResource("BoxShape3D_0c2du") + +[node name="Mesh2" type="MeshInstance3D" parent="Pit/WallEast"] +mesh = SubResource("BoxMesh_5pmlq") +skeleton = NodePath("../..") + +[node name="WallWest" type="CollisionShape3D" parent="Pit"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 0.5, 0) +shape = SubResource("BoxShape3D_0c2du") + +[node name="Mesh3" type="MeshInstance3D" parent="Pit/WallWest"] +mesh = SubResource("BoxMesh_5pmlq") +skeleton = NodePath("../..") + +[node name="WallNorth" type="CollisionShape3D" parent="Pit"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, -4) +shape = SubResource("BoxShape3D_vahxc") + +[node name="Mesh4" type="MeshInstance3D" parent="Pit/WallNorth"] +mesh = SubResource("BoxMesh_tfqct") +skeleton = NodePath("../..") + +[node name="Ball1" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) + +[node name="SphereShape1" type="CollisionShape3D" parent="Ball1"] +shape = SubResource("SphereShape3D_w5jpo") + +[node name="BallMesh1" type="MeshInstance3D" parent="Ball1/SphereShape1"] +mesh = SubResource("SphereMesh_pwtuc") + +[node name="Ball2" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 2, 0.5) + +[node name="SphereShape2" type="CollisionShape3D" parent="Ball2"] +shape = SubResource("SphereShape3D_oldn1") + +[node name="BallMesh2" type="MeshInstance3D" parent="Ball2/SphereShape2"] +mesh = SubResource("SphereMesh_pwtuc") + +[node name="Ball3" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 2.5, 0) + +[node name="SphereShape3" type="CollisionShape3D" parent="Ball3"] +shape = SubResource("SphereShape3D_fva84") + +[node name="BallMesh3" type="MeshInstance3D" parent="Ball3/SphereShape3"] +mesh = SubResource("SphereMesh_pwtuc") + +[node name="Ball4" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.25, 3.5, 0) + +[node name="SphereShape4" type="CollisionShape3D" parent="Ball4"] +shape = SubResource("SphereShape3D_fva84") + +[node name="BallMesh4" type="MeshInstance3D" parent="Ball4/SphereShape4"] +mesh = SubResource("SphereMesh_pwtuc") + +[node name="Ball5" type="RigidBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 4, -0.5) + +[node name="SphereShape5" type="CollisionShape3D" parent="Ball5"] +shape = SubResource("SphereShape3D_fva84") + +[node name="BallMesh5" type="MeshInstance3D" parent="Ball5/SphereShape5"] +mesh = SubResource("SphereMesh_pwtuc") + +[node name="Camera" type="Camera3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, 0, 3, 6) +current = true diff --git a/examples/omi_physics_body/source/dynamic_with_velocity.tscn b/examples/omi_physics_body/source/dynamic_with_velocity.tscn new file mode 100644 index 0000000..aa10d08 --- /dev/null +++ b/examples/omi_physics_body/source/dynamic_with_velocity.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://df4tvsoecmbno"] + +[sub_resource type="SphereShape3D" id="SphereShape3D_ghi6v"] + +[node name="DynamicWithVelocity" type="RigidBody3D"] +linear_velocity = Vector3(1, 2, 3) +angular_velocity = Vector3(0.0698132, 0.0872665, 0.10472) + +[node name="SphereShape" type="CollisionShape3D" parent="."] +shape = SubResource("SphereShape3D_ghi6v") diff --git a/examples/omi_physics_body/test/ball_pit_test.tscn b/examples/omi_physics_body/test/ball_pit_test.tscn new file mode 100644 index 0000000..516b2e5 --- /dev/null +++ b/examples/omi_physics_body/test/ball_pit_test.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://bj66xgroi8kl8"] + +[ext_resource type="PackedScene" uid="uid://jtuy1pve36dv" path="res://examples/test_environment.tscn" id="1_ij25r"] +[ext_resource type="PackedScene" uid="uid://diapqybopv4bm" path="res://examples/omi_physics_body/gltf/ball_pit.gltf" id="2_35ssb"] + +[node name="BallPitTest" type="Node3D"] + +[node name="TestEnvironment" parent="." instance=ExtResource("1_ij25r")] + +[node name="ball_pit" parent="." instance=ExtResource("2_35ssb")] + +[editable path="ball_pit"] diff --git a/examples/omi_physics_body/test/dynamic_with_velocity_test.tscn b/examples/omi_physics_body/test/dynamic_with_velocity_test.tscn new file mode 100644 index 0000000..e3b4299 --- /dev/null +++ b/examples/omi_physics_body/test/dynamic_with_velocity_test.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=3 uid="uid://casq6vbvfk3p"] + +[ext_resource type="PackedScene" uid="uid://jtuy1pve36dv" path="res://examples/test_environment.tscn" id="1_ij25r"] +[ext_resource type="PackedScene" uid="uid://eg861a2cj7dh" path="res://examples/omi_physics_body/gltf/dynamic_with_velocity.gltf" id="2_adu20"] + +[node name="DynamicWithVelocityTest" type="Node3D"] + +[node name="TestEnvironment" parent="." instance=ExtResource("1_ij25r")] + +[node name="Camera3D" type="Camera3D" parent="TestEnvironment"] +transform = Transform3D(1, -4.68079e-16, 3.27752e-16, 3.27752e-16, 0.939693, 0.34202, -4.68079e-16, -0.34202, 0.939693, 2.08165e-12, 1, 3) + +[node name="dynamic_with_velocity" parent="." instance=ExtResource("2_adu20")] + +[editable path="dynamic_with_velocity"] diff --git a/examples/omi_physics_body/test/indirect_children_test.tscn b/examples/omi_physics_body/test/indirect_children_test.tscn new file mode 100644 index 0000000..4995ad7 --- /dev/null +++ b/examples/omi_physics_body/test/indirect_children_test.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=3 uid="uid://cxxxndqoodxpc"] + +[ext_resource type="PackedScene" uid="uid://jtuy1pve36dv" path="res://examples/test_environment.tscn" id="1_ij25r"] +[ext_resource type="PackedScene" uid="uid://cmkrpebetoacu" path="res://examples/omi_physics_body/gltf/indirect_children.gltf" id="2_7pi2r"] + +[node name="IndirectChildrenTest" type="Node3D"] + +[node name="TestEnvironment" parent="." instance=ExtResource("1_ij25r")] + +[node name="Camera3D" type="Camera3D" parent="TestEnvironment"] +transform = Transform3D(1, -4.3906e-16, 3.36902e-16, 3.36902e-16, 0.965926, 0.258819, -4.3906e-16, -0.258819, 0.965926, 2.08165e-12, 1, 3) + +[node name="indirect_children" parent="." instance=ExtResource("2_7pi2r")] + +[editable path="indirect_children"] diff --git a/examples/omi_physics_body/test/two_boxes_test.tscn b/examples/omi_physics_body/test/two_boxes_test.tscn new file mode 100644 index 0000000..a1a017d --- /dev/null +++ b/examples/omi_physics_body/test/two_boxes_test.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=3 uid="uid://c27ulxafysf50"] + +[ext_resource type="PackedScene" uid="uid://jtuy1pve36dv" path="res://examples/test_environment.tscn" id="1_ij25r"] +[ext_resource type="PackedScene" uid="uid://bwge2lbkxrt1r" path="res://examples/omi_physics_body/gltf/two_boxes.gltf" id="2_xk8ku"] + +[node name="TwoBoxesTest" type="Node3D"] + +[node name="TestEnvironment" parent="." instance=ExtResource("1_ij25r")] + +[node name="Camera3D" type="Camera3D" parent="TestEnvironment"] +transform = Transform3D(1, -4.68079e-16, 3.27752e-16, 3.27752e-16, 0.939693, 0.34202, -4.68079e-16, -0.34202, 0.939693, 2.08165e-12, 1, 3) + +[node name="two_boxes" parent="." instance=ExtResource("2_xk8ku")] + +[editable path="two_boxes"] diff --git a/examples/omi_physics_joint/gltf/hanging_rope.gltf b/examples/omi_physics_joint/gltf/hanging_rope.gltf index f8d444b..e315b09 100644 --- a/examples/omi_physics_joint/gltf/hanging_rope.gltf +++ b/examples/omi_physics_joint/gltf/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.000015, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +135,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -249,12 +145,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +185,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -335,223 +195,98 @@ "byteOffset": 0, "componentType": 5125, "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.3.dev.custom_build@63b13fec6a1ee9fc9b45985377219b33a41a3954", "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" - } + { "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.0500000007450581 - }, + "perspective": { "yfov": 1.30899691581726, "zfar": 4000, "znear": 0.05 }, "type": "perspective" } ], "extensions": { - "OMI_collider": { - "colliders": [ - { - "size": [ - 0.5, - 0.5, - 0.5 - ], - "type": "box" - }, + "OMI_physics_joint": { + "constraints": [ { - "height": 0.5, - "radius": 0.0500000007450581, - "type": "capsule" + "linearAxes": [0, 1, 2], + "stiffness": 0.3 } ] }, - "OMI_physics_joint": { - "constraints": [ + "OMI_physics_shape": { + "shapes": [ { - "linearAxes": [ - 0, - 1, - 2 - ], - "stiffness": 0.300000011920929 + "box": { + "size": [0.5, 0.5, 0.5] + }, + "type": "box" + }, + { + "capsule": { + "height": 0.5, + "radius": 0.05 + }, + "type": "capsule" } ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "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 } }, { - "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } }, { - "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } }, { - "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -559,17 +294,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 +305,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 +316,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 +327,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 @@ -633,245 +340,123 @@ ], "nodes": [ { - "children": [ - 1, - 4, - 5, - 8, - 9, - 12, - 13, - 16 - ], - "extensions": {}, + "children": [1, 4, 5, 8, 9, 12, 13, 16], "name": "HangingRope" }, { - "children": [ - 2 - ], - "extensions": { - "OMI_physics_body": { - "type": "static" - } - }, + "children": [2], + "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_collider": { - "collider": 0 - } - }, + "children": [3], + "extensions": { "OMI_physics_body": { "collider": { "shape": 0 } } }, "name": "CeilingCollider" }, { - "extensions": {}, "mesh": 0, "name": "CeilingMesh" }, { - "extensions": { - "OMI_physics_joint": { - "constraints": [ - 0 - ], - "nodeA": 5, - "nodeB": 1 - } - }, + "extensions": { "OMI_physics_joint": { "constraints": [0], "nodeA": 5, "nodeB": 1 } }, "name": "PinJoint1", - "translation": [ - -0.0000000279397, - 1.25, - 0.00000000000208164995657567 - ] + "translation": [-0, 1.25, 0] }, { - "children": [ - 6 - ], - "extensions": { - "OMI_physics_body": { - "type": "rigid" - } - }, + "children": [6], + "extensions": { "OMI_physics_body": { "motion": { "type": "dynamic" } } }, "name": "RopeSegmentTop", - "rotation": [ - 0.000000000000000213587655926077, - 0.000000000000000123314960753772, - 0.258819162845612, - 0.965925812721252 - ], - "translation": [ - -0.17000000178814, - 1.14999997615814, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, 0.258819162845612, 0.965925812721252], + "translation": [-0.17, 1.15, 0] }, { - "children": [ - 7 - ], - "extensions": { - "OMI_collider": { - "collider": 1 - } - }, + "children": [7], + "extensions": { "OMI_physics_body": { "collider": { "shape": 1 } } }, "name": "RopeColliderTop", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "rotation": [0, 0, 0.70710676908493, 0.70710676908493] }, { - "extensions": {}, "mesh": 1, "name": "RopeMeshTop" }, { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 9, "nodeB": 5 } }, "name": "PinJoint2", - "translation": [ - -0.37000000476837, - 1.02999997138977, - 0.00000000000208164995657567 - ] + "translation": [-0.37, 1.03, 0] }, { - "children": [ - 10 - ], + "children": [10], "extensions": { "OMI_physics_body": { - "type": "rigid" + "motion": { "type": "dynamic" } } }, "name": "RopeSegmentMiddle", - "rotation": [ - 0.000000000000000202027284087501, - 0.000000000000000141460709354785, - 0.173648044466972, - 0.984807789325714 - ], - "translation": [ - -0.5799999833107, - 0.949999988079071, - 0.00000000000208164995657567 - ] + "rotation": [0, 0, 0.173648044466972, 0.984807789325714], + "translation": [-0.58, 0.95, 0] }, { - "children": [ - 11 - ], + "children": [11], "extensions": { - "OMI_collider": { - "collider": 1 + "OMI_physics_body": { + "collider": { "shape": 1 } } }, "name": "RopeColliderMiddle", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "rotation": [0, 0, 0.70710676908493, 0.70710676908493] }, { - "extensions": {}, "mesh": 2, "name": "RopeMeshMiddle" }, { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 13, "nodeB": 9 } }, "name": "PinJoint3", - "translation": [ - -0.80000001192093, - 0.870000004768372, - 0.00000000000208164995657567 - ] + "translation": [-0.8, 0.87, 0] }, { - "children": [ - 14 - ], + "children": [14], "extensions": { "OMI_physics_body": { - "type": "rigid" + "motion": { "type": "dynamic" } } }, "name": "RopeSegmentBottom", - "translation": [ - -1.02999997138977, - 0.870000004768372, - 0.00000000000208164995657567 - ] + "translation": [-1.03, 0.87, 0] }, { - "children": [ - 15 - ], + "children": [15], "extensions": { - "OMI_collider": { - "collider": 1 + "OMI_physics_body": { + "collider": { "shape": 1 } } }, "name": "RopeColliderBottom", - "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 - ] + "rotation": [0, 0, 0.70710676908493, 0.70710676908493] }, { - "extensions": {}, "mesh": 3, "name": "RopeMeshBottom" }, { "camera": 0, - "extensions": {}, "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.600000023841858, - 1.5 - ] + "translation": [0, 0.6, 1.5] } ], "scene": 0, - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] + "scenes": [{ "nodes": [0] }] } diff --git a/examples/omi_physics_joint/gltf/pendulum_balls.gltf b/examples/omi_physics_joint/gltf/pendulum_balls.gltf index 8e030e8..ed1c065 100644 --- a/examples/omi_physics_joint/gltf/pendulum_balls.gltf +++ b/examples/omi_physics_joint/gltf/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.000015, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.249717, 0.25, 0.249717], + "min": [-0.249717, -0.25, -0.249717], "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.000022, -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.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], "normalized": false, "type": "VEC3" }, @@ -147,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +135,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -249,12 +145,8 @@ "byteOffset": 0, "componentType": 5125, "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.249717, 0.25, 0.249717], + "min": [-0.249717, -0.25, -0.249717], "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.000022, -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.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], "normalized": false, "type": "VEC3" }, @@ -319,14 +185,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -335,12 +195,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +235,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -421,12 +245,8 @@ "byteOffset": 0, "componentType": 5125, "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.249717, 0.25, 0.249717], + "min": [-0.249717, -0.25, -0.249717], "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.000022, -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.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], "normalized": false, "type": "VEC3" }, @@ -491,14 +285,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -507,12 +295,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +335,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -593,12 +345,8 @@ "byteOffset": 0, "componentType": 5125, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" } @@ -804,11 +552,7 @@ "OMI_collider": { "colliders": [ { - "size": [ - 2, - 0.200000002980232, - 0.200000002980232 - ], + "size": [2, 0.200000002980232, 0.200000002980232], "type": "box" }, { @@ -820,38 +564,22 @@ "OMI_physics_joint": { "constraints": [ { - "linearAxes": [ - 0, - 1, - 2 - ], + "linearAxes": [0, 1, 2], "stiffness": 0.300000011920929 }, { - "angularAxes": [ - 0, - 1 - ], + "angularAxes": [0, 1], "stiffness": 0.300000011920929 } ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "extensionsUsed": ["OMI_collider", "OMI_physics_body", "OMI_physics_joint"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -859,12 +587,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -872,12 +595,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -885,12 +603,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -898,12 +611,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -911,12 +619,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -924,12 +627,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -1065,39 +763,22 @@ ], "nodes": [ { - "children": [ - 1, - 4, - 5, - 9, - 10, - 14, - 15, - 19 - ], + "children": [1, 4, 5, 9, 10, 14, 15, 19], "extensions": {}, "name": "PendulumBalls" }, { - "children": [ - 2 - ], + "children": [2], "extensions": { "OMI_physics_body": { "type": "static" } }, "name": "TopBody", - "translation": [ - 0.00000000000208164995657567, - 1, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 1, 0.00000000000208164995657567] }, { - "children": [ - 3 - ], + "children": [3], "extensions": { "OMI_collider": { "collider": 0 @@ -1113,42 +794,26 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0, - 1 - ], + "constraints": [0, 1], "nodeA": 1, "nodeB": 5 } }, "name": "HingeJoint1", - "translation": [ - 0.00000000000208164995657567, - 0.899999976158142, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 0.899999976158142, 0.00000000000208164995657567] }, { - "children": [ - 6, - 8 - ], + "children": [6, 8], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "Ball1", - "translation": [ - 0.00000000000208164995657567, - -0.25, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, -0.25, 0.00000000000208164995657567] }, { - "children": [ - 7 - ], + "children": [7], "extensions": { "OMI_collider": { "collider": 1 @@ -1165,57 +830,34 @@ "extensions": {}, "mesh": 2, "name": "BallStringMesh1", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 0.699999988079071, 0.00000000000208164995657567] }, { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0, - 1 - ], + "constraints": [0, 1], "nodeA": 1, "nodeB": 10 } }, "name": "HingeJoint2", - "translation": [ - -0.44999998807907, - 0.899999976158142, - 0.00000000000208164995657567 - ] + "translation": [-0.44999998807907, 0.899999976158142, 0.00000000000208164995657567] }, { - "children": [ - 11, - 13 - ], + "children": [11, 13], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "Ball2", "rotation": [ - 0.000000000000000094381003489835, - 0.000000000000000227855912687686, - -0.38268345594406, - 0.923879563808441 + 0.000000000000000094381003489835, 0.000000000000000227855912687686, -0.38268345594406, 0.923879563808441 ], - "translation": [ - -1.26317000389099, - 0.0868272036314011, - 0.00000000000208164995657567 - ] + "translation": [-1.26317000389099, 0.0868272036314011, 0.00000000000208164995657567] }, { - "children": [ - 12 - ], + "children": [12], "extensions": { "OMI_collider": { "collider": 1 @@ -1232,63 +874,35 @@ "extensions": {}, "mesh": 4, "name": "BallStringMesh2", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 0.699999988079071, 0.00000000000208164995657567] }, { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0, - 1 - ], + "constraints": [0, 1], "nodeA": 1, "nodeB": 15 } }, "name": "HingeJoint3", "rotation": [ - 0.000000000000000213587655926077, - 0.000000000000000123314960753772, - 0.258819162845612, - 0.965925812721252 + 0.000000000000000213587655926077, 0.000000000000000123314960753772, 0.258819162845612, 0.965925812721252 ], - "translation": [ - 0.449999988079071, - 0.899999976158142, - 0.00000000000208164995657567 - ] + "translation": [0.449999988079071, 0.899999976158142, 0.00000000000208164995657567] }, { - "children": [ - 16, - 18 - ], + "children": [16, 18], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "Ball3", - "rotation": [ - 0.000000000000000440183937976967, - -0, - 0.991444885730743, - 0.130526155233383 - ], - "translation": [ - 0.747641980648041, - 2.01080989837646, - 0.00000000000208192989757661 - ] + "rotation": [0.000000000000000440183937976967, -0, 0.991444885730743, 0.130526155233383], + "translation": [0.747641980648041, 2.01080989837646, 0.00000000000208192989757661] }, { - "children": [ - 17 - ], + "children": [17], "extensions": { "OMI_collider": { "collider": 1 @@ -1305,29 +919,19 @@ "extensions": {}, "mesh": 6, "name": "BallStringMesh22", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 0.699999988079071, 0.00000000000208164995657567] }, { "camera": 0, "extensions": {}, "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.00000000000208164995657567, - 1.5 - ] + "translation": [0.00000000000208164995657567, 0.00000000000208164995657567, 1.5] } ], "scene": 0, "scenes": [ { - "nodes": [ - 0 - ] + "nodes": [0] } ] } diff --git a/examples/omi_physics_joint/gltf/rope_railing.gltf b/examples/omi_physics_joint/gltf/rope_railing.gltf index 644cb65..3c7e434 100644 --- a/examples/omi_physics_joint/gltf/rope_railing.gltf +++ b/examples/omi_physics_joint/gltf/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.075, 0.55, 0.075], + "min": [-0.075, -0.55, -0.075], "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.000015, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +135,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -249,12 +145,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +185,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -335,12 +195,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +235,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -421,12 +245,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +285,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -507,12 +295,8 @@ "byteOffset": 0, "componentType": 5125, "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.075, 0.55, 0.075], + "min": [-0.075, -0.55, -0.075], "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.000015, -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,14 +335,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -593,12 +345,8 @@ "byteOffset": 0, "componentType": 5125, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" } @@ -804,11 +552,7 @@ "OMI_collider": { "colliders": [ { - "size": [ - 0.150000005960464, - 1.10000002384186, - 0.150000005960464 - ], + "size": [0.150000005960464, 1.10000002384186, 0.150000005960464], "type": "box" }, { @@ -821,31 +565,18 @@ "OMI_physics_joint": { "constraints": [ { - "linearAxes": [ - 0, - 1, - 2 - ], + "linearAxes": [0, 1, 2], "stiffness": 0.300000011920929 } ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "extensionsUsed": ["OMI_collider", "OMI_physics_body", "OMI_physics_joint"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -853,12 +584,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -866,12 +592,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -879,12 +600,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -892,12 +608,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -905,12 +616,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -918,12 +624,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -1059,45 +760,22 @@ ], "nodes": [ { - "children": [ - 1, - 4, - 5, - 8, - 9, - 12, - 13, - 16, - 17, - 20, - 21, - 24, - 25, - 28 - ], + "children": [1, 4, 5, 8, 9, 12, 13, 16, 17, 20, 21, 24, 25, 28], "extensions": {}, "name": "RopeRailing" }, { - "children": [ - 2 - ], + "children": [2], "extensions": { "OMI_physics_body": { "type": "static" } }, "name": "PoleLeft", - "translation": [ - -1.10000002384186, - 0.550000011920929, - 0.00000000000208164735449046 - ] + "translation": [-1.10000002384186, 0.550000011920929, 0.00000000000208164735449046] }, { - "children": [ - 3 - ], + "children": [3], "extensions": { "OMI_collider": { "collider": 0 @@ -1113,46 +791,29 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 1, "nodeB": 5 } }, "name": "PinJoint1", - "translation": [ - -1.02999997138977, - 0.980000019073486, - 0.00000000000208164735449046 - ] + "translation": [-1.02999997138977, 0.980000019073486, 0.00000000000208164735449046] }, { - "children": [ - 6 - ], + "children": [6], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "RopeSegmentLeft", "rotation": [ - 0.000000000000000123314947518882, - 0.000000000000000213587655926077, - -0.25881916284561, - 0.965925812721252 + 0.000000000000000123314947518882, 0.000000000000000213587655926077, -0.25881916284561, 0.965925812721252 ], - "translation": [ - -0.86000001430511, - 0.879999995231628, - 0.00000000000208164995657567 - ] + "translation": [-0.86000001430511, 0.879999995231628, 0.00000000000208164995657567] }, { - "children": [ - 7 - ], + "children": [7], "extensions": { "OMI_collider": { "collider": 1 @@ -1160,10 +821,7 @@ }, "name": "RopeColliderLeft", "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 + 0.000000000000000246629630339969, 0.00000000000000000000000935848017, 0.70710676908493, 0.70710676908493 ] }, { @@ -1174,46 +832,29 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 5, "nodeB": 9 } }, "name": "PinJoint2", - "translation": [ - -0.66000002622604, - 0.759999990463257, - 0.00000000000208164995657567 - ] + "translation": [-0.66000002622604, 0.759999990463257, 0.00000000000208164995657567] }, { - "children": [ - 10 - ], + "children": [10], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "RopeSegmentLeftMiddle", "rotation": [ - 0.000000000000000141460722589675, - 0.000000000000000202027284087501, - -0.17364804446697, - 0.984807789325714 + 0.000000000000000141460722589675, 0.000000000000000202027284087501, -0.17364804446697, 0.984807789325714 ], - "translation": [ - -0.44999998807907, - 0.680000007152557, - 0.00000000000208164995657567 - ] + "translation": [-0.44999998807907, 0.680000007152557, 0.00000000000208164995657567] }, { - "children": [ - 11 - ], + "children": [11], "extensions": { "OMI_collider": { "collider": 1 @@ -1221,10 +862,7 @@ }, "name": "RopeColliderLeftMiddle", "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 + 0.000000000000000246629630339969, 0.00000000000000000000000935848017, 0.70710676908493, 0.70710676908493 ] }, { @@ -1235,40 +873,26 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 9, "nodeB": 13 } }, "name": "PinJoint3", - "translation": [ - -0.23000000417233, - 0.600000023841858, - 0.00000000000208164995657567 - ] + "translation": [-0.23000000417233, 0.600000023841858, 0.00000000000208164995657567] }, { - "children": [ - 14 - ], + "children": [14], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "RopeSegmentMiddle", - "translation": [ - 0.00000000000208164995657567, - 0.600000023841858, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 0.600000023841858, 0.00000000000208164995657567] }, { - "children": [ - 15 - ], + "children": [15], "extensions": { "OMI_collider": { "collider": 1 @@ -1276,10 +900,7 @@ }, "name": "RopeColliderMiddle", "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 + 0.000000000000000246629630339969, 0.00000000000000000000000935848017, 0.70710676908493, 0.70710676908493 ] }, { @@ -1290,46 +911,29 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 13, "nodeB": 17 } }, "name": "PinJoint4", - "translation": [ - 0.230000004172325, - 0.600000023841858, - 0.00000000000208164995657567 - ] + "translation": [0.230000004172325, 0.600000023841858, 0.00000000000208164995657567] }, { - "children": [ - 18 - ], + "children": [18], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "RopeSegmentRightMiddle", "rotation": [ - 0.000000000000000202027284087501, - 0.000000000000000141460709354785, - 0.173648044466972, - 0.984807789325714 + 0.000000000000000202027284087501, 0.000000000000000141460709354785, 0.173648044466972, 0.984807789325714 ], - "translation": [ - 0.449999988079071, - 0.680000007152557, - 0.00000000000208164995657567 - ] + "translation": [0.449999988079071, 0.680000007152557, 0.00000000000208164995657567] }, { - "children": [ - 19 - ], + "children": [19], "extensions": { "OMI_collider": { "collider": 1 @@ -1337,10 +941,7 @@ }, "name": "RopeColliderRightMiddle", "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 + 0.000000000000000246629630339969, 0.00000000000000000000000935848017, 0.70710676908493, 0.70710676908493 ] }, { @@ -1351,46 +952,29 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 17, "nodeB": 21 } }, "name": "PinJoint5", - "translation": [ - 0.660000026226044, - 0.759999990463257, - 0.00000000000208164995657567 - ] + "translation": [0.660000026226044, 0.759999990463257, 0.00000000000208164995657567] }, { - "children": [ - 22 - ], + "children": [22], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "RopeSegmentRight", "rotation": [ - 0.000000000000000213587655926077, - 0.000000000000000123314960753772, - 0.258819162845612, - 0.965925812721252 + 0.000000000000000213587655926077, 0.000000000000000123314960753772, 0.258819162845612, 0.965925812721252 ], - "translation": [ - 0.860000014305115, - 0.879999995231628, - 0.00000000000208164995657567 - ] + "translation": [0.860000014305115, 0.879999995231628, 0.00000000000208164995657567] }, { - "children": [ - 23 - ], + "children": [23], "extensions": { "OMI_collider": { "collider": 1 @@ -1398,10 +982,7 @@ }, "name": "RopeColliderRight", "rotation": [ - 0.000000000000000246629630339969, - 0.00000000000000000000000935848017, - 0.70710676908493, - 0.70710676908493 + 0.000000000000000246629630339969, 0.00000000000000000000000935848017, 0.70710676908493, 0.70710676908493 ] }, { @@ -1412,40 +993,26 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0 - ], + "constraints": [0], "nodeA": 21, "nodeB": 25 } }, "name": "PinJoint6", - "translation": [ - 1.02999997138977, - 0.980000019073486, - 0.00000000000208164735449046 - ] + "translation": [1.02999997138977, 0.980000019073486, 0.00000000000208164735449046] }, { - "children": [ - 26 - ], + "children": [26], "extensions": { "OMI_physics_body": { "type": "static" } }, "name": "PoleRight", - "translation": [ - 1.10000002384186, - 0.550000011920929, - 0.00000000000208164735449046 - ] + "translation": [1.10000002384186, 0.550000011920929, 0.00000000000208164735449046] }, { - "children": [ - 27 - ], + "children": [27], "extensions": { "OMI_collider": { "collider": 0 @@ -1462,19 +1029,13 @@ "camera": 0, "extensions": {}, "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.600000023841858, - 1.5 - ] + "translation": [0.00000000000208164995657567, 0.600000023841858, 1.5] } ], "scene": 0, "scenes": [ { - "nodes": [ - 0 - ] + "nodes": [0] } ] } diff --git a/examples/omi_physics_joint/gltf/simple_joint.gltf b/examples/omi_physics_joint/gltf/simple_joint.gltf index a230238..9d8ccf0 100644 --- a/examples/omi_physics_joint/gltf/simple_joint.gltf +++ b/examples/omi_physics_joint/gltf/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.000022, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "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.000015, -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,14 +135,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -249,12 +145,8 @@ "byteOffset": 0, "componentType": 5125, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" } @@ -378,21 +270,12 @@ ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "extensionsUsed": ["OMI_collider", "OMI_physics_body", "OMI_physics_joint"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -400,12 +283,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -413,12 +291,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -496,7 +369,7 @@ "children": [4], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "BodyA", @@ -507,7 +380,7 @@ "children": [6], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "BodyB", diff --git a/examples/omi_physics_joint/gltf/slider_ball.gltf b/examples/omi_physics_joint/gltf/slider_ball.gltf index ddd65cb..c93a157 100644 --- a/examples/omi_physics_joint/gltf/slider_ball.gltf +++ b/examples/omi_physics_joint/gltf/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.000015, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.249717, 0.25, 0.249717], + "min": [-0.249717, -0.25, -0.249717], "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.000022, -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.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], "normalized": false, "type": "VEC3" }, @@ -147,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "count": 12672, - "max": [ - 2209 - ], - "min": [ - 0 - ], + "max": [2209], + "min": [0], "normalized": false, "type": "SCALAR" } @@ -249,11 +177,7 @@ "OMI_collider": { "colliders": [ { - "size": [ - 2, - 0.100000001490116, - 0.100000001490116 - ], + "size": [2, 0.100000001490116, 0.100000001490116], "type": "box" }, { @@ -266,52 +190,33 @@ "constraints": [ { "damping": 0.5, - "linearAxes": [ - 0 - ], + "linearAxes": [0], "lowerLimit": -1.75, "stiffness": 1, "upperLimit": 0.25 }, { - "linearAxes": [ - 1, - 2 - ], + "linearAxes": [1, 2], "stiffness": 1 }, { - "angularAxes": [ - 0 - ], + "angularAxes": [0], "damping": 0, "stiffness": 1 }, { - "angularAxes": [ - 1, - 2 - ], + "angularAxes": [1, 2], "stiffness": 1 } ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "extensionsUsed": ["OMI_collider", "OMI_physics_body", "OMI_physics_joint"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -319,12 +224,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -370,19 +270,12 @@ ], "nodes": [ { - "children": [ - 1, - 4, - 5, - 8 - ], + "children": [1, 4, 5, 8], "extensions": {}, "name": "PendulumBalls" }, { - "children": [ - 2 - ], + "children": [2], "extensions": { "OMI_physics_body": { "type": "static" @@ -391,9 +284,7 @@ "name": "SliderLine" }, { - "children": [ - 3 - ], + "children": [3], "extensions": { "OMI_collider": { "collider": 0 @@ -409,53 +300,28 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0, - 1, - 2, - 3 - ], + "constraints": [0, 1, 2, 3], "nodeA": 5, "nodeB": 1 } }, "name": "SliderJoint", - "translation": [ - -0.75, - 0.00000000000208164995657567, - 0.00000000000208164995657567 - ] + "translation": [-0.75, 0.00000000000208164995657567, 0.00000000000208164995657567] }, { - "children": [ - 6 - ], + "children": [6], "extensions": { "OMI_physics_body": { - "angularVelocity": [ - 0.0174532998353243, - 0.0174532998353243, - 0.0174532998353243 - ], - "linearVelocity": [ - 1, - 0.00000000000208164995657567, - 0.00000000000208164995657567 - ], - "type": "rigid" + "angularVelocity": [0.0174532998353243, 0.0174532998353243, 0.0174532998353243], + "linearVelocity": [1, 0.00000000000208164995657567, 0.00000000000208164995657567], + "type": "dynamic" } }, "name": "Ball", - "translation": [ - -0.75, - 0.00000000000208164995657567, - 0.00000000000208164995657567 - ] + "translation": [-0.75, 0.00000000000208164995657567, 0.00000000000208164995657567] }, { - "children": [ - 7 - ], + "children": [7], "extensions": { "OMI_collider": { "collider": 1 @@ -472,19 +338,13 @@ "camera": 0, "extensions": {}, "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.00000000000208164995657567, - 1.5 - ] + "translation": [0.00000000000208164995657567, 0.00000000000208164995657567, 1.5] } ], "scene": 0, "scenes": [ { - "nodes": [ - 0 - ] + "nodes": [0] } ] } diff --git a/examples/omi_physics_joint/gltf/swing_and_slide.gltf b/examples/omi_physics_joint/gltf/swing_and_slide.gltf index 21e4b06..cd33290 100644 --- a/examples/omi_physics_joint/gltf/swing_and_slide.gltf +++ b/examples/omi_physics_joint/gltf/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.000015, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.249717, 0.25, 0.249717], + "min": [-0.249717, -0.25, -0.249717], "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.000022, -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.998868, 1, 0.998868], + "min": [-0.998869, -1, -0.998867], "normalized": false, "type": "VEC3" }, @@ -147,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 2210, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +135,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -249,12 +145,8 @@ "byteOffset": 0, "componentType": 5125, "count": 10368, - "max": [ - 1949 - ], - "min": [ - 0 - ], + "max": [1949], + "min": [0], "normalized": false, "type": "SCALAR" } @@ -360,11 +252,7 @@ "OMI_collider": { "colliders": [ { - "size": [ - 2, - 0.100000001490116, - 0.100000001490116 - ], + "size": [2, 0.100000001490116, 0.100000001490116], "type": "box" }, { @@ -376,45 +264,28 @@ "OMI_physics_joint": { "constraints": [ { - "linearAxes": [ - 0 - ], + "linearAxes": [0], "lowerLimit": -0.25, "stiffness": 0.699999988079071, "upperLimit": 1.75 }, { - "linearAxes": [ - 1, - 2 - ], + "linearAxes": [1, 2], "stiffness": 0.699999988079071 }, { - "angularAxes": [ - 0, - 1 - ], + "angularAxes": [0, 1], "stiffness": 0.5 } ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "extensionsUsed": ["OMI_collider", "OMI_physics_body", "OMI_physics_joint"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -422,12 +293,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -435,12 +301,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -504,35 +365,22 @@ ], "nodes": [ { - "children": [ - 1, - 4, - 5, - 9 - ], + "children": [1, 4, 5, 9], "extensions": {}, "name": "SwingAndSlide" }, { - "children": [ - 2 - ], + "children": [2], "extensions": { "OMI_physics_body": { "type": "static" } }, "name": "TopBody", - "translation": [ - 0.00000000000208164995657567, - 1, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 1, 0.00000000000208164995657567] }, { - "children": [ - 3 - ], + "children": [3], "extensions": { "OMI_collider": { "collider": 0 @@ -548,49 +396,29 @@ { "extensions": { "OMI_physics_joint": { - "constraints": [ - 0, - 1, - 2 - ], + "constraints": [0, 1, 2], "nodeA": 1, "nodeB": 5 } }, "name": "CustomJoint", - "translation": [ - -0.75, - 1, - 0.00000000000208164995657567 - ] + "translation": [-0.75, 1, 0.00000000000208164995657567] }, { - "children": [ - 6, - 8 - ], + "children": [6, 8], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "Ball", "rotation": [ - 0.000000000000000094381003489835, - 0.000000000000000227855912687686, - -0.38268345594406, - 0.923879563808441 + 0.000000000000000094381003489835, 0.000000000000000227855912687686, -0.38268345594406, 0.923879563808441 ], - "translation": [ - -1.60000002384186, - 0.150000005960464, - 0.00000000000208164995657567 - ] + "translation": [-1.60000002384186, 0.150000005960464, 0.00000000000208164995657567] }, { - "children": [ - 7 - ], + "children": [7], "extensions": { "OMI_collider": { "collider": 1 @@ -607,29 +435,19 @@ "extensions": {}, "mesh": 2, "name": "BallStringMesh", - "translation": [ - 0.00000000000208164995657567, - 0.699999988079071, - 0.00000000000208164995657567 - ] + "translation": [0.00000000000208164995657567, 0.699999988079071, 0.00000000000208164995657567] }, { "camera": 0, "extensions": {}, "name": "Camera", - "translation": [ - 0.00000000000208164995657567, - 0.00000000000208164995657567, - 1.5 - ] + "translation": [0.00000000000208164995657567, 0.00000000000208164995657567, 1.5] } ], "scene": 0, "scenes": [ { - "nodes": [ - 0 - ] + "nodes": [0] } ] } diff --git a/examples/omi_physics_joint/gltf/weld_joint.gltf b/examples/omi_physics_joint/gltf/weld_joint.gltf index f63e8ba..8f74ce5 100644 --- a/examples/omi_physics_joint/gltf/weld_joint.gltf +++ b/examples/omi_physics_joint/gltf/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.000022, -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,14 +35,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -77,12 +45,8 @@ "byteOffset": 0, "componentType": 5125, "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.000022, -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,14 +85,8 @@ "byteOffset": 0, "componentType": 5126, "count": 1950, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -163,12 +95,8 @@ "byteOffset": 0, "componentType": 5125, "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.000015, -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,14 +135,8 @@ "byteOffset": 0, "componentType": 5126, "count": 24, - "max": [ - 1, - 1 - ], - "min": [ - 0, - 0 - ], + "max": [1, 1], + "min": [0, 0], "normalized": false, "type": "VEC2" }, @@ -249,12 +145,8 @@ "byteOffset": 0, "componentType": 5125, "count": 36, - "max": [ - 23 - ], - "min": [ - 0 - ], + "max": [23], + "min": [0], "normalized": false, "type": "SCALAR" } @@ -379,21 +271,12 @@ ] } }, - "extensionsUsed": [ - "OMI_collider", - "OMI_physics_body", - "OMI_physics_joint" - ], + "extensionsUsed": ["OMI_collider", "OMI_physics_body", "OMI_physics_joint"], "materials": [ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -401,12 +284,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -414,12 +292,7 @@ { "extensions": {}, "pbrMetallicRoughness": { - "baseColorFactor": [ - 0.99999988079071, - 0.99999988079071, - 0.99999988079071, - 1 - ], + "baseColorFactor": [1, 1, 1, 1], "metallicFactor": 0, "roughnessFactor": 1 } @@ -491,7 +364,7 @@ "children": [2], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "BodyA", @@ -525,21 +398,17 @@ "translation": [-0.23, 0.6, 0.0] }, { - "children": [ - 6 - ], + "children": [6], "extensions": { "OMI_physics_body": { - "type": "rigid" + "type": "dynamic" } }, "name": "BodyB", "translation": [0.0, 0.6, 0.0] }, { - "children": [ - 7 - ], + "children": [7], "extensions": { "OMI_collider": { "collider": 0 @@ -554,9 +423,7 @@ "name": "MeshB" }, { - "children": [ - 9 - ], + "children": [9], "extensions": { "OMI_physics_body": { "type": "static" diff --git a/examples/omi_physics_joint/test/hanging_rope_test.tscn b/examples/omi_physics_joint/test/hanging_rope_test.tscn index 207825d..8373eae 100644 --- a/examples/omi_physics_joint/test/hanging_rope_test.tscn +++ b/examples/omi_physics_joint/test/hanging_rope_test.tscn @@ -7,4 +7,6 @@ [node name="TestEnvironment" parent="." instance=ExtResource("1_actd1")] -[node name="hanging_rope" parent="." instance=ExtResource("2_leltm")] +[node name="HangingRope" parent="." instance=ExtResource("2_leltm")] + +[editable path="HangingRope"] diff --git a/examples/omi_physics_shape/box_collider.gltf b/examples/omi_physics_shape/box_collider.gltf new file mode 100644 index 0000000..0ef07ad --- /dev/null +++ b/examples/omi_physics_shape/box_collider.gltf @@ -0,0 +1,32 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box", + "box": { + "size": [1, 1, 1] + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "BoxShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/box_collider.gltf.import b/examples/omi_physics_shape/box_collider.gltf.import new file mode 100644 index 0000000..f55a896 --- /dev/null +++ b/examples/omi_physics_shape/box_collider.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cy6wslfeqlxr5" +path="res://.godot/imported/box_collider.gltf-b2a8ceb95dac380aad76aa09d870d831.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/box_collider.gltf" +dest_files=["res://.godot/imported/box_collider.gltf-b2a8ceb95dac380aad76aa09d870d831.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/capsule_collider.gltf b/examples/omi_physics_shape/capsule_collider.gltf new file mode 100644 index 0000000..c50b221 --- /dev/null +++ b/examples/omi_physics_shape/capsule_collider.gltf @@ -0,0 +1,33 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "capsule", + "capsule": { + "height": 2.0, + "radius": 0.5 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "CapsuleShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/capsule_collider.gltf.import b/examples/omi_physics_shape/capsule_collider.gltf.import new file mode 100644 index 0000000..619284c --- /dev/null +++ b/examples/omi_physics_shape/capsule_collider.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://n700xm6yvnn6" +path="res://.godot/imported/capsule_collider.gltf-bf9d91e17b2d92defd98bb155c92a4d3.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/capsule_collider.gltf" +dest_files=["res://.godot/imported/capsule_collider.gltf-bf9d91e17b2d92defd98bb155c92a4d3.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/convex/convex_hull.gltf b/examples/omi_physics_shape/convex/convex_hull.gltf new file mode 100644 index 0000000..82955c4 --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull.gltf @@ -0,0 +1,186 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5125, + "count": 24, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + }, + { + "bufferView": 2, + "byteOffset": 0, + "componentType": 5126, + "count": 20, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 3, + "byteOffset": 0, + "componentType": 5126, + "count": 20, + "max": [0.999969, 0, 0.999969, 1], + "min": [-0.999969, -0.007936, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 4, + "byteOffset": 0, + "componentType": 5126, + "count": 20, + "max": [0.894377, 0.447188, 1], + "min": [-0.894377, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 5, + "byteOffset": 0, + "componentType": 5126, + "count": 20, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 6, + "byteOffset": 0, + "componentType": 5125, + "count": 24, + "max": [19], + "min": [2], + "normalized": false, + "type": "SCALAR" + } + ], + "asset": { + "version": "2.0" + }, + "bufferViews": [ + { + "buffer": 0, + "byteLength": 288, + "byteOffset": 0 + }, + { + "buffer": 0, + "byteLength": 96, + "byteOffset": 288 + }, + { + "buffer": 0, + "byteLength": 240, + "byteOffset": 384 + }, + { + "buffer": 0, + "byteLength": 320, + "byteOffset": 624 + }, + { + "buffer": 0, + "byteLength": 240, + "byteOffset": 944 + }, + { + "buffer": 0, + "byteLength": 160, + "byteOffset": 1184 + }, + { + "buffer": 0, + "byteLength": 96, + "byteOffset": 1344 + } + ], + "buffers": [ + { + "byteLength": 1440, + "uri": "convex_hull0.bin" + } + ], + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "convex", + "convex": { + "mesh": 0 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "meshes": [ + { + "extras": { + "targetNames": [] + }, + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 4 + } + ] + }, + { + "extras": { + "targetNames": [] + }, + "primitives": [ + { + "attributes": { + "NORMAL": 4, + "POSITION": 2, + "TANGENT": 3, + "TEXCOORD_0": 5 + }, + "indices": 6, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "children": [1], + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "ConvexHullShape" + }, + { + "extensions": {}, + "mesh": 1, + "name": "ConvexMesh" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/convex/convex_hull.gltf.import b/examples/omi_physics_shape/convex/convex_hull.gltf.import new file mode 100644 index 0000000..06d20a7 --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dvlufs1d4b6ww" +path="res://.godot/imported/convex_hull.gltf-ed6dd0f9a224ac81343f0c72d7b98cfa.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/convex/convex_hull.gltf" +dest_files=["res://.godot/imported/convex_hull.gltf-ed6dd0f9a224ac81343f0c72d7b98cfa.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/convex/convex_hull0.bin b/examples/omi_physics_shape/convex/convex_hull0.bin new file mode 100644 index 0000000..6dd4d73 Binary files /dev/null and b/examples/omi_physics_shape/convex/convex_hull0.bin differ diff --git a/examples/omi_physics_shape/convex/convex_hull_only.gltf b/examples/omi_physics_shape/convex/convex_hull_only.gltf new file mode 100644 index 0000000..062b1ce --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull_only.gltf @@ -0,0 +1,88 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5125, + "count": 24, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + } + ], + "asset": { + "version": "2.0" + }, + "bufferViews": [ + { + "buffer": 0, + "byteLength": 288, + "byteOffset": 0 + }, + { + "buffer": 0, + "byteLength": 96, + "byteOffset": 288 + } + ], + "buffers": [ + { + "byteLength": 384, + "uri": "convex_hull_only0.bin" + } + ], + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "convex", + "convex": { + "mesh": 0 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "meshes": [ + { + "extras": { + "targetNames": [] + }, + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "ConvexHullShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/convex/convex_hull_only.gltf.import b/examples/omi_physics_shape/convex/convex_hull_only.gltf.import new file mode 100644 index 0000000..ba3be4c --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull_only.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://cwjnn1k07yp60" +path="res://.godot/imported/convex_hull_only.gltf-d96564fc7b81514e30a5b6abc59931aa.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/convex/convex_hull_only.gltf" +dest_files=["res://.godot/imported/convex_hull_only.gltf-d96564fc7b81514e30a5b6abc59931aa.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/convex/convex_hull_only0.bin b/examples/omi_physics_shape/convex/convex_hull_only0.bin new file mode 100644 index 0000000..fc706fe Binary files /dev/null and b/examples/omi_physics_shape/convex/convex_hull_only0.bin differ diff --git a/examples/omi_physics_shape/cylinder_collider.gltf b/examples/omi_physics_shape/cylinder_collider.gltf new file mode 100644 index 0000000..9825547 --- /dev/null +++ b/examples/omi_physics_shape/cylinder_collider.gltf @@ -0,0 +1,33 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "cylinder", + "cylinder": { + "height": 2.0, + "radius": 0.5 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "CylinderShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/cylinder_collider.gltf.import b/examples/omi_physics_shape/cylinder_collider.gltf.import new file mode 100644 index 0000000..f0bb4ce --- /dev/null +++ b/examples/omi_physics_shape/cylinder_collider.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://7ndmhgabj3lx" +path="res://.godot/imported/cylinder_collider.gltf-71fbc6f7144d531fde1a28643c7bcf11.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/cylinder_collider.gltf" +dest_files=["res://.godot/imported/cylinder_collider.gltf-71fbc6f7144d531fde1a28643c7bcf11.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/default_box.gltf b/examples/omi_physics_shape/default_box.gltf new file mode 100644 index 0000000..dfb8fbe --- /dev/null +++ b/examples/omi_physics_shape/default_box.gltf @@ -0,0 +1,29 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "box" + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "DefaultBoxShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/default_box.gltf.import b/examples/omi_physics_shape/default_box.gltf.import new file mode 100644 index 0000000..a7e9997 --- /dev/null +++ b/examples/omi_physics_shape/default_box.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://blnrt50e55jk5" +path="res://.godot/imported/default_box.gltf-f5ed84dba7f01db427d1662f925b98f6.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/default_box.gltf" +dest_files=["res://.godot/imported/default_box.gltf-f5ed84dba7f01db427d1662f925b98f6.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/sphere_collider.gltf b/examples/omi_physics_shape/sphere_collider.gltf new file mode 100644 index 0000000..9950274 --- /dev/null +++ b/examples/omi_physics_shape/sphere_collider.gltf @@ -0,0 +1,32 @@ +{ + "asset": { + "version": "2.0" + }, + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "sphere", + "sphere": { + "radius": 0.5 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "SphereShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/sphere_collider.gltf.import b/examples/omi_physics_shape/sphere_collider.gltf.import new file mode 100644 index 0000000..5352ec4 --- /dev/null +++ b/examples/omi_physics_shape/sphere_collider.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://l7p1scqw2vqs" +path="res://.godot/imported/sphere_collider.gltf-0c02be34e6f69c1d0016e18de8d4f6a8.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/sphere_collider.gltf" +dest_files=["res://.godot/imported/sphere_collider.gltf-0c02be34e6f69c1d0016e18de8d4f6a8.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/trimesh/concave_trimesh.gltf b/examples/omi_physics_shape/trimesh/concave_trimesh.gltf new file mode 100644 index 0000000..f88d938 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh.gltf @@ -0,0 +1,152 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 0, 1, 1], + "min": [-1, -0.000015, -1, 1], + "normalized": false, + "type": "VEC4" + }, + { + "bufferView": 2, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1, 1], + "min": [-1, -1, -1], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 3, + "byteOffset": 0, + "componentType": 5126, + "count": 24, + "max": [1, 1], + "min": [0, 0], + "normalized": false, + "type": "VEC2" + }, + { + "bufferView": 4, + "byteOffset": 0, + "componentType": 5125, + "count": 36, + "max": [23], + "min": [0], + "normalized": false, + "type": "SCALAR" + } + ], + "asset": { + "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 + } + ], + "buffers": [ + { + "byteLength": 1296, + "uri": "concave_trimesh0.bin" + } + ], + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "trimesh", + "trimesh": { + "mesh": 0 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "materials": [ + { + "pbrMetallicRoughness": { + "baseColorFactor": [1, 1, 1, 1], + "metallicFactor": 0, + "roughnessFactor": 1 + } + } + ], + "meshes": [ + { + "extras": { + "targetNames": [] + }, + "primitives": [ + { + "attributes": { + "NORMAL": 2, + "POSITION": 0, + "TANGENT": 1, + "TEXCOORD_0": 3 + }, + "indices": 4, + "material": 0, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "children": [1], + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "ConcaveTrimeshShape" + }, + { + "extensions": {}, + "mesh": 0, + "name": "BoxMeshInstance" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/trimesh/concave_trimesh.gltf.import b/examples/omi_physics_shape/trimesh/concave_trimesh.gltf.import new file mode 100644 index 0000000..f723947 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://r0ms342r60un" +path="res://.godot/imported/concave_trimesh.gltf-de4c4cb2f892b844e9bd6de96fd2accf.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/trimesh/concave_trimesh.gltf" +dest_files=["res://.godot/imported/concave_trimesh.gltf-de4c4cb2f892b844e9bd6de96fd2accf.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/trimesh/concave_trimesh0.bin b/examples/omi_physics_shape/trimesh/concave_trimesh0.bin new file mode 100644 index 0000000..969920a Binary files /dev/null and b/examples/omi_physics_shape/trimesh/concave_trimesh0.bin differ diff --git a/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf b/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf new file mode 100644 index 0000000..5a35e55 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf @@ -0,0 +1,88 @@ +{ + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 36, + "max": [0.5, 0.5, 0.5], + "min": [-0.5, -0.5, -0.5], + "normalized": false, + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5125, + "count": 36, + "max": [35], + "min": [0], + "normalized": false, + "type": "SCALAR" + } + ], + "asset": { + "version": "2.0" + }, + "bufferViews": [ + { + "buffer": 0, + "byteLength": 432, + "byteOffset": 0 + }, + { + "buffer": 0, + "byteLength": 144, + "byteOffset": 432 + } + ], + "buffers": [ + { + "byteLength": 576, + "uri": "concave_trimesh_only0.bin" + } + ], + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "type": "trimesh", + "trimesh": { + "mesh": 0 + } + } + ] + } + }, + "extensionsUsed": ["OMI_physics_body", "OMI_physics_shape"], + "meshes": [ + { + "extras": { + "targetNames": [] + }, + "primitives": [ + { + "attributes": { + "POSITION": 0 + }, + "indices": 1, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "extensions": { + "OMI_physics_body": { + "collider": { + "shape": 0 + } + } + }, + "name": "ConcaveTrimeshShape" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf.import b/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf.import new file mode 100644 index 0000000..90bccf6 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf.import @@ -0,0 +1,39 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://d0bx80palh5dp" +path="res://.godot/imported/concave_trimesh_only.gltf-f561d0c65b1c602b3716ad0590440903.scn" + +[deps] + +source_file="res://examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf" +dest_files=["res://.godot/imported/concave_trimesh_only.gltf-f561d0c65b1c602b3716ad0590440903.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/examples/omi_physics_shape/trimesh/concave_trimesh_only0.bin b/examples/omi_physics_shape/trimesh/concave_trimesh_only0.bin new file mode 100644 index 0000000..a8baead Binary files /dev/null and b/examples/omi_physics_shape/trimesh/concave_trimesh_only0.bin differ diff --git a/project.godot b/project.godot index d65252f..5c474e1 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="OMI extensions for Godot" -config/features=PackedStringArray("4.1") +config/features=PackedStringArray("4.3") config/icon="res://icon.svg" [editor_plugins]