From 14195dac1eda9140192ca07003258715b8b0abd3 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 10 May 2023 23:59:04 -0500 Subject: implement basic floating-ray character controller --- save | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'save') diff --git a/save b/save index 788c570..69147da 100644 --- a/save +++ b/save @@ -1,12 +1,12 @@ -Entity("da572a27-909f-4e33-9b2b-d26a46e0b99c", {node={name="p",parent="ea9b0c92-30d2-47a0-9d80-060a61f4b01b",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, 1.0000, 0.0000, 0.0000, -1.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("c9b1e77d-b5c7-4208-8fbd-0761d6fb1da8", {onFramebufferSize={script="scripts.viewportResize"},onKey={script="scripts.loadSaveQuit"}}) -Entity("7e203ab5-abd0-421b-8694-003a4d77039d", {onFramebufferSize={script="scripts.cameraHandleResize"},camera={projection=Mat4{1.3573, 0.0000, 0.0000, 0.0000, 0.0000, 2.4142, 0.0000, 0.0000, 0.0000, 0.0000, -1.0002, -0.2000, 0.0000, 0.0000, -1.0000, 0.0000},render="screen"},node={parent="9e81e64c-3fe8-456d-9815-c181d222662a",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 20.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("17b94ee1-b8e3-4ee3-b2ec-c7a274158cad", {renderMesh={shader={vertex="vertex.glsl",fragment="fragment.glsl"},textures={ourTexture={filename="assets/skyboxsun5deg2_tn.jpg"}},mesh={filename="assets/skybox.obj",index=1}},node={parent="ea9b0c92-30d2-47a0-9d80-060a61f4b01b",matrix=Mat4{2.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -2.0000, 0.0000, 0.0000, 2.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("528c3418-64dc-404b-b40e-7cf457d7aa70", {node={matrix=Mat4{0.9962, -0.0872, 0.0000, 0.0000, 0.0872, 0.9962, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}},collision={class="plane"}}) -Entity("06ba239b-62da-4340-a1d5-134458fb1005", {collision={radius=1,class="sphere"},renderMesh={textures={ourTexture={filename="77155.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"},mesh={filename="assets/icosahedron.obj",index=1}},physics={mass={density=1,radius=1,class="sphere"},velocity=Vec3{-2.3798, -0.2083, 3.0820},angularVelocity=Vec3{3.7957, -8.0179, 2.3889}},node={matrix=Mat4{-0.7850, 0.3990, 0.4738, -22.8622, 0.6096, 0.6337, 0.4762, -1.0007, -0.1103, 0.6627, -0.7407, 40.5313, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("9e81e64c-3fe8-456d-9815-c181d222662a", {onCursorPos={script="scripts.cameraPivot"},node={name="pivot",parent="da572a27-909f-4e33-9b2b-d26a46e0b99c",matrix=Mat4{-0.9135, -0.2560, 0.3161, 0.0000, 0.0000, 0.7771, 0.6293, 0.0000, -0.4067, 0.5749, -0.7100, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}},pitchyaw={pitch=-39,yaw=-1284}}) -Entity("ea9b0c92-30d2-47a0-9d80-060a61f4b01b", {renderMesh={shader={vertex="vertex.glsl",fragment="fragment.glsl"},mesh={filename="assets/capsule.obj",index=1}},physics={mass={radius=1,class="capsule",density=1,direction=3,length=2},angularVelocity=Vec3{0.0000, 0.0000, 0.0000},velocity=Vec3{-3.3700, -0.3634, 7.5619},maxAngularSpeed=0},script={script="scripts.capsuleMove"},collision={radius=1,class="capsule",length=2},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 5.8502, 0.0000, 0.0000, -1.0000, 2.5154, 0.0000, 1.0000, 0.0000, 9.9416, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("e94dddfb-57ea-4c7c-8b27-c1dae3df1f8d", {onFramebufferSize={script="scripts.cameraHandleResize"},ccamera={projection=Mat4{0.7500, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, -1.0002, -0.2000, 0.0000, 0.0000, -1.0000, 0.0000},render="screen"},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -1.0000, -0.0000, 0.0000, 1.0000, -0.0000, 10.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("377d9441-2c63-4e36-a5fc-5ac1b6939126", {renderMesh={textures={ourTexture={filename="assets/green+grass-1024x1024.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"},mesh={filename="builtin.quad",index=1}},node={parent="528c3418-64dc-404b-b40e-7cf457d7aa70",matrix=Mat4{20.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -20.0000, 0.0000, 0.0000, 20.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("51daa068-1bbc-427b-b145-d63390f329dc", {renderMesh={shader={vertex="vertex.glsl",fragment="fragment.glsl"},mesh={filename="builtin.quad",index=1}},node={parent="06ba239b-62da-4340-a1d5-134458fb1005",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 2.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -Entity("2e5a45ec-e72c-445f-aa16-e92670f31b5a", {renderQuad={shader={vertex="vertex.glsl",fragment="fragment.glsl"},textures={ourTexture={filename="44d9a0ec1c18e6126a5e9d9d9317f5ac.png"}}}}) +Entity("2a08965c-962c-4800-9033-8127e39e891c", {renderQuad={textures={ourTexture={filename="44d9a0ec1c18e6126a5e9d9d9317f5ac.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}}) +Entity("62f52427-4a91-4d9b-8728-b84c029a491c", {onFramebufferSize={script="scripts.viewportResize"},onKey={script="scripts.loadSaveQuit"}}) +Entity("a5d93d49-f1bf-4481-a9b2-a535c7f572fe", {onScroll={script="scripts.character.cameraDistance"},node={parent="5ed47a34-36bf-45b3-b6a0-c77bbb3da102",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 20.0000, 0.0000, 0.0000, 0.0000, 1.0000}},onFramebufferSize={script="scripts.cameraHandleResize"},camera={render="screen",projection=Mat4{2.5518, 0.0000, 0.0000, 0.0000, 0.0000, 2.4142, 0.0000, 0.0000, 0.0000, 0.0000, -1.0002, -0.2000, 0.0000, 0.0000, -1.0000, 0.0000}}}) +Entity("66a57409-094d-4ccb-80b8-b76e68d1cf35", {script={script="scripts.capsuleMove"},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 6.9968, 0.0000, 0.0000, -1.0000, 3.8860, 0.0000, 1.0000, 0.0000, 6.7345, 0.0000, 0.0000, 0.0000, 1.0000}},collision={class="capsule",length=2,collide=-3,radius=1,category=2},renderMesh={mesh={index=1,filename="assets/capsule.obj"},textures={ourTexture={filename="assets/green-grass.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},physics={mass={class="capsule",direction=3,length=2,mass=10,radius=1},maxAngularSpeed=0,surface=true,velocity=Vec3{0.0000, 0.0080, 0.0000},angularVelocity=Vec3{0.0000, 0.0000, 0.0000}}}) +Entity("cb39f828-cf3b-4eb5-b165-b51cea3d065e", {spring={F=0},node={parent="66a57409-094d-4ccb-80b8-b76e68d1cf35",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="spring"},collision={class="ray",length=4,collide=-3,category=2},onCollision={script="scripts.character.spring"}}) +Entity("50f43874-fef7-43ec-bbaf-51095ec4a154", {node={parent="66a57409-094d-4ccb-80b8-b76e68d1cf35",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, 1.0000, 0.0000, 0.0000, -1.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="p"}}) +Entity("5ed47a34-36bf-45b3-b6a0-c77bbb3da102", {node={parent="50f43874-fef7-43ec-bbaf-51095ec4a154",matrix=Mat4{-0.8090, 0.2759, -0.5190, 0.0000, 0.0000, 0.8829, 0.4695, 0.0000, 0.5878, 0.3798, -0.7143, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="pivot"},onCursorPos={script="scripts.cameraPivot"},pitchyaw={pitch=-28,yaw=-144}}) +Entity("b26e69d3-0707-42a0-8f02-91b3e96de271", {collision={class="plane"},node={matrix=Mat4{0.9962, -0.0872, 0.0000, 0.0000, 0.0872, 0.9962, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) +Entity("10192474-032a-4d1f-84d1-ddd283bfec5d", {renderMesh={mesh={index=1,filename="assets/skybox.obj"},textures={ourTexture={filename="assets/skyboxsun5deg2_tn.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},node={matrix=Mat4{2.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -2.0000, 0.0000, 0.0000, 2.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) +Entity("8cc5b679-57a4-4337-8328-fa618a900c3f", {renderMesh={mesh={index=1,filename="builtin.quad"},textures={ourTexture={filename="assets/green+grass-1024x1024.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},node={parent="b26e69d3-0707-42a0-8f02-91b3e96de271",matrix=Mat4{20.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -20.0000, 0.0000, 0.0000, 20.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) +Entity("5ce8bc4a-b6ce-4e6f-8a1c-4c9ae4b0d500", {node={matrix=Mat4{-0.5859, 0.8104, 0.0000, -40.8664, -0.8104, -0.5859, 0.0000, -2.5749, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}},collision={class="sphere",radius=1},renderMesh={mesh={index=1,filename="assets/icosahedron.obj"},textures={ourTexture={filename="77155.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},physics={mass={class="sphere",density=1,radius=1},surface=true,velocity=Vec3{-7.1146, -0.6224, 0.0000},angularVelocity=Vec3{0.0000, 0.0000, 7.1418}}}) +Entity("b79ee907-fe95-41d7-9496-1be53e2a5c0e", {renderMesh={mesh={index=1,filename="builtin.quad"},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},node={parent="5ce8bc4a-b6ce-4e6f-8a1c-4c9ae4b0d500",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 2.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}}) -- cgit v1.2.1