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..cf2a757 --- /dev/null +++ b/examples/omi_physics_body/gltf/ball_pit.gltf @@ -0,0 +1,983 @@ +{ + "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": { + "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.05 + }, + "type": "perspective" + } + ], + "extensions": { + "OMI_physics_shape": { + "shapes": [ + { + "box": { + "size": [8, 0.1, 8] + }, + "type": "box" + }, + { + "box": { + "size": [0.1, 1, 8] + }, + "type": "box" + }, + { + "box": { + "size": [8, 1, 0.1] + }, + "type": "box" + }, + { + "sphere": { + "radius": 0.5 + }, + "type": "sphere" + } + ] + } + }, + "extensionsUsed": [ + "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..fb8e72b --- /dev/null +++ b/examples/omi_physics_body/gltf/ball_pit.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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/dynamic_box.gltf b/examples/omi_physics_body/gltf/dynamic_box.gltf new file mode 100644 index 0000000..db7e9c6 --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_box.gltf @@ -0,0 +1,46 @@ +{ + "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..c230465 --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_box.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..7ccf18c --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf @@ -0,0 +1,50 @@ +{ + "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..0d91a17 --- /dev/null +++ b/examples/omi_physics_body/gltf/dynamic_with_velocity.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..881187d --- /dev/null +++ b/examples/omi_physics_body/gltf/indirect_children.gltf @@ -0,0 +1,125 @@ +{ + "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": {} + } + }, + "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": {} + } + }, + "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..1c23f32 --- /dev/null +++ b/examples/omi_physics_body/gltf/indirect_children.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..65e0d7f --- /dev/null +++ b/examples/omi_physics_body/gltf/static_body_motion.gltf @@ -0,0 +1,46 @@ +{ + "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..5860c89 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_body_motion.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..5169119 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_compound_collider.gltf @@ -0,0 +1,44 @@ +{ + "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..562e676 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_compound_collider.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..cebc6e7 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_with_trigger.gltf @@ -0,0 +1,62 @@ +{ + "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..2da7810 --- /dev/null +++ b/examples/omi_physics_body/gltf/static_with_trigger.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..104ac70 --- /dev/null +++ b/examples/omi_physics_body/gltf/trigger_box.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": { + "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..6727797 --- /dev/null +++ b/examples/omi_physics_body/gltf/trigger_box.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..e696db7 --- /dev/null +++ b/examples/omi_physics_body/gltf/two_boxes.gltf @@ -0,0 +1,72 @@ +{ + "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": {} + } + }, + "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..53ca29c --- /dev/null +++ b/examples/omi_physics_body/gltf/two_boxes.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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/stress.gltf b/examples/omi_physics_body/stress.gltf new file mode 100644 index 0000000..9d9cbcc --- /dev/null +++ b/examples/omi_physics_body/stress.gltf @@ -0,0 +1,38 @@ +{ + "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": "StressTest" + } + ], + "scene": 0, + "scenes": [{ "nodes": [0] }] +} diff --git a/examples/omi_physics_body/stress.gltf.import b/examples/omi_physics_body/stress.gltf.import new file mode 100644 index 0000000..3efeb1e --- /dev/null +++ b/examples/omi_physics_body/stress.gltf.import @@ -0,0 +1,32 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://dy33awu1q8wci" +path="res://.godot/imported/stress.gltf-32c601bda3c35fcdae067579f26b2605.scn" + +[deps] + +source_file="res://examples/omi_physics_body/stress.gltf" +dest_files=["res://.godot/imported/stress.gltf-32c601bda3c35fcdae067579f26b2605.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +gltf/embedded_image_handling=1 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..5a462fe --- /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://2f1ti688j81e"] + +[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..aa8689b --- /dev/null +++ b/examples/omi_physics_body/test/dynamic_with_velocity_test.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=3 format=3 uid="uid://cjk2wbr1n5auw"] + +[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")] 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..784c0b8 --- /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://djaardsajyhbf"] + +[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..62c23c5 --- /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://uqknupbq0b8m"] + +[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/test/hanging_rope_test.tscn b/examples/omi_physics_joint/test/hanging_rope_test.tscn index 207825d..262b692 100644 --- a/examples/omi_physics_joint/test/hanging_rope_test.tscn +++ b/examples/omi_physics_joint/test/hanging_rope_test.tscn @@ -8,3 +8,5 @@ [node name="TestEnvironment" parent="." instance=ExtResource("1_actd1")] [node name="hanging_rope" parent="." instance=ExtResource("2_leltm")] + +[editable path="hanging_rope"] diff --git a/examples/omi_physics_shape/box_collider.gltf b/examples/omi_physics_shape/box_collider.gltf new file mode 100644 index 0000000..46cfd5f --- /dev/null +++ b/examples/omi_physics_shape/box_collider.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 + } + } + }, + "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..557ff46 --- /dev/null +++ b/examples/omi_physics_shape/box_collider.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..e474778 --- /dev/null +++ b/examples/omi_physics_shape/capsule_collider.gltf @@ -0,0 +1,36 @@ +{ + "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..749d92d --- /dev/null +++ b/examples/omi_physics_shape/capsule_collider.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..58248c7 --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull.gltf @@ -0,0 +1,237 @@ +{ + "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..5f16a3d --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..2a65df0 --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull_only.gltf @@ -0,0 +1,103 @@ +{ + "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..15be787 --- /dev/null +++ b/examples/omi_physics_shape/convex/convex_hull_only.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..3be22e8 --- /dev/null +++ b/examples/omi_physics_shape/cylinder_collider.gltf @@ -0,0 +1,36 @@ +{ + "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..0457cce --- /dev/null +++ b/examples/omi_physics_shape/cylinder_collider.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..373429d --- /dev/null +++ b/examples/omi_physics_shape/default_box.gltf @@ -0,0 +1,32 @@ +{ + "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..9e0c069 --- /dev/null +++ b/examples/omi_physics_shape/default_box.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..b7ad929 --- /dev/null +++ b/examples/omi_physics_shape/sphere_collider.gltf @@ -0,0 +1,35 @@ +{ + "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..12bef9f --- /dev/null +++ b/examples/omi_physics_shape/sphere_collider.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..876e006 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh.gltf @@ -0,0 +1,196 @@ +{ + "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": [ + 0.99999988079071, + 0.99999988079071, + 0.99999988079071, + 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..773518e --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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..017aef4 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf @@ -0,0 +1,103 @@ +{ + "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..81357f2 --- /dev/null +++ b/examples/omi_physics_shape/trimesh/concave_trimesh_only.gltf.import @@ -0,0 +1,32 @@ +[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 +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +import_script/path="" +_subresources={} +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 8f5b427..2c2d555 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.2") config/icon="res://icon.svg" [editor_plugins]