From 719dd408080caf5423440f7fc51662724aafb80a Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Thu, 24 Mar 2022 20:45:49 +0200 Subject: [PATCH] starting weapon rendering stuff --- Content/Common/PlayerPrefab.prefab | 95 ++++++++++---- Content/Materials/SimpleMapMaterial.flax | Bin 32172 -> 32172 bytes Content/Scenes/AerowalkScene.scene | 117 +++++++++++++++--- .../EngineSettings/BuildSettings.json | 10 +- .../EngineSettings/InputSettings.json | 6 +- .../EngineSettings/LayersAndTagsSettings.json | 34 +---- .../Settings/EngineSettings/TimeSettings.json | 4 +- .../WindowsPlatformSettings.json | 1 - Source/Game/PlayerInputLocal.cs | 4 + Source/Game/PlayerMovement.cs | 4 +- 10 files changed, 187 insertions(+), 88 deletions(-) diff --git a/Content/Common/PlayerPrefab.prefab b/Content/Common/PlayerPrefab.prefab index cad2e9d..46f153a 100644 --- a/Content/Common/PlayerPrefab.prefab +++ b/Content/Common/PlayerPrefab.prefab @@ -1,11 +1,12 @@ { - "ID": "2d0e518b47d735c98312dd87cc42d6d7", + "ID": "669786bb4ff6bc8d85f94eb2c1e999ef", "TypeName": "FlaxEngine.Prefab", - "EngineBuild": 6226, + "EngineBuild": 6330, "Data": [ { - "ID": "999a202c47de967d2bdfd09abcc6df4e", + "ID": "a92dd29b4dc581e60b1508967a8cd083", "TypeName": "FlaxEngine.RigidBody", + "ParentID": "00000000000000000000000000000000", "Name": "PlayerPrefab", "Transform": { "Translation": { @@ -17,7 +18,7 @@ "X": 0.0, "Y": 1.0, "Z": -0.0, - "W": -4.371138828673793e-8 + "W": -4.3711388286737938e-8 } }, "StaticFlags": 0, @@ -30,26 +31,26 @@ "EnableGravity": false }, { - "ID": "b29a58f545071ca393afaab21faa83ad", + "ID": "850836984ead400bf8d6c0a4dcbd48b7", "TypeName": "Game.PlayerMovement", - "ParentID": "999a202c47de967d2bdfd09abcc6df4e", + "ParentID": "a92dd29b4dc581e60b1508967a8cd083", "V": { - "JumpLandSound": "bb00d24d4b651f5d5b44f09c022c83ac", - "JumpLandSound2": "d3598b01434cf7ace99acfb27e08cbe5", - "JumpLandSound3": "5869f22d4f8396e06b0cf7a3b70fb5d2" -} + "JumpLandSound": "bb00d24d4b651f5d5b44f09c022c83ac", + "JumpLandSound2": "d3598b01434cf7ace99acfb27e08cbe5", + "JumpLandSound3": "5869f22d4f8396e06b0cf7a3b70fb5d2" + } }, { - "ID": "a67383834fc3f6f1106e8099e5557e32", + "ID": "ee7fb88049d7a9693321c98370efaaa1", "TypeName": "FlaxEngine.EmptyActor", - "ParentID": "999a202c47de967d2bdfd09abcc6df4e", + "ParentID": "a92dd29b4dc581e60b1508967a8cd083", "Name": "RootActor", "StaticFlags": 0 }, { - "ID": "b8fc420f4efe96fa2b4042bd98fd3e74", + "ID": "999cdfd74a651d657c9c73ad61c70940", "TypeName": "FlaxEngine.Camera", - "ParentID": "a67383834fc3f6f1106e8099e5557e32", + "ParentID": "ee7fb88049d7a9693321c98370efaaa1", "Name": "Camera", "Transform": { "Translation": { @@ -62,16 +63,66 @@ "Near": 1.0 }, { - "ID": "226bdb004e72848777178a9d1f207cbf", + "ID": "0e65525f42af427cf75b11bb73781b33", "TypeName": "FlaxEngine.AudioListener", - "ParentID": "b8fc420f4efe96fa2b4042bd98fd3e74", + "ParentID": "999cdfd74a651d657c9c73ad61c70940", "Name": "AudioListener", "StaticFlags": 0 }, { - "ID": "8bd80bca49ac35da66aabaa2e473851d", + "ID": "74df088d40c3f3b2e3de558eeeb94aa4", + "TypeName": "FlaxEngine.EmptyActor", + "ParentID": "999cdfd74a651d657c9c73ad61c70940", + "Name": "WeaponHolder", + "Transform": { + "Orientation": { + "X": 0.0, + "Y": -1.0, + "Z": 0.0, + "W": -4.3711388286737938e-8 + } + } + }, + { + "ID": "c0044cab4a579b3238c025bb24f79a40", + "TypeName": "FlaxEngine.StaticModel", + "ParentID": "74df088d40c3f3b2e3de558eeeb94aa4", + "Name": "DummyWeapon", + "Transform": { + "Translation": { + "X": -10.356758117675782, + "Y": -17.27110290527344, + "Z": -16.54382705688477 + }, + "Orientation": { + "X": -2.9248639066281613e-8, + "Y": 0.7431446313858032, + "Z": -0.6691308617591858, + "W": -3.24838822507445e-8 + }, + "Scale": { + "X": 0.10999999940395357, + "Y": 0.550000011920929, + "Z": 0.10999999940395357 + } + }, + "StaticFlags": 0, + "Model": "223aa9894e90973780ab508621517526", + "Buffer": { + "Entries": [ + { + "Material": "a75d425f40ef7ba5df0fdb8d470e8a78", + "ShadowsMode": 3, + "Visible": true, + "ReceiveDecals": true + } + ] + } + }, + { + "ID": "f3d1646e45ab7a13907723b38fae2347", "TypeName": "FlaxEngine.CapsuleCollider", - "ParentID": "999a202c47de967d2bdfd09abcc6df4e", + "ParentID": "a92dd29b4dc581e60b1508967a8cd083", "IsActive": false, "Name": "CapsuleCollider", "Transform": { @@ -89,9 +140,9 @@ "Height": 52.0 }, { - "ID": "d9d61d314ad79d49ba08059cef50f802", + "ID": "493fc7734584b9be62b4d3b8493416fe", "TypeName": "FlaxEngine.BoxCollider", - "ParentID": "999a202c47de967d2bdfd09abcc6df4e", + "ParentID": "a92dd29b4dc581e60b1508967a8cd083", "Name": "BoxCollider", "StaticFlags": 0, "ContactOffset": 0.0, @@ -103,9 +154,9 @@ } }, { - "ID": "b377cc03418270d87e8a5b92cb5374ea", + "ID": "3e55bd9a46fb749db3e7e7993eb6d78c", "TypeName": "FlaxEngine.MeshCollider", - "ParentID": "999a202c47de967d2bdfd09abcc6df4e", + "ParentID": "a92dd29b4dc581e60b1508967a8cd083", "IsActive": false, "Name": "CylinderCollider", "Transform": { diff --git a/Content/Materials/SimpleMapMaterial.flax b/Content/Materials/SimpleMapMaterial.flax index cd3771e64297ccbf977f24580c54195955fa4cb2..5217a531a066512b725687066bdb7e677f343fba 100644 GIT binary patch delta 16 YcmZ4Un{mx=#tqvT85uWkXZ%_X07N_ol>h($ delta 16 YcmZ4Un{mx=#tqvT85uTjXZ%_X07NzilmGw# diff --git a/Content/Scenes/AerowalkScene.scene b/Content/Scenes/AerowalkScene.scene index 4603a1a..6907847 100644 --- a/Content/Scenes/AerowalkScene.scene +++ b/Content/Scenes/AerowalkScene.scene @@ -76,7 +76,7 @@ }, "Control": "FlaxEngine.GUI.Label", "Data": { - "Text": "eFPS: 120\nuFPS: 120\nrFPS: 120\npFPS: 30", + "Text": "eFPS: 119\nuFPS: 120\nrFPS: 120\npFPS: 30", "TextColor": { "R": 1.0, "G": 1.0, @@ -264,51 +264,132 @@ }, { "ID": "6c66fa4a4a5de8998eb84388d1648317", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "999a202c47de967d2bdfd09abcc6df4e", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "a92dd29b4dc581e60b1508967a8cd083", "ParentID": "194e05f445ece24ec5448d886e1334df" }, { "ID": "d5c84d67417ddf09908c76b6f0582b43", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "b29a58f545071ca393afaab21faa83ad", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "850836984ead400bf8d6c0a4dcbd48b7", "ParentID": "6c66fa4a4a5de8998eb84388d1648317", "V": {} }, { "ID": "d1a76c334a514c99f8f5b2bd81abae2c", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "a67383834fc3f6f1106e8099e5557e32", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "ee7fb88049d7a9693321c98370efaaa1", "ParentID": "6c66fa4a4a5de8998eb84388d1648317" }, { "ID": "357077e9405b2a7ba50198bbed8bd5f9", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "b8fc420f4efe96fa2b4042bd98fd3e74", - "ParentID": "d1a76c334a514c99f8f5b2bd81abae2c" + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "999cdfd74a651d657c9c73ad61c70940", + "ParentID": "d1a76c334a514c99f8f5b2bd81abae2c", + "RemovedObjects": [ + "74df088d40c3f3b2e3de558eeeb94aa4" + ], + "RenderLayersMask": 4294967293 + }, + { + "ID": "b3ec430c49bdf80b32cf33a9598f2a20", + "TypeName": "Game.CameraRender", + "ParentID": "357077e9405b2a7ba50198bbed8bd5f9", + "V": { + "camera": "60b5234946cf59e5c3b772aa53c799c7" +} }, { "ID": "905d23324e7f98c9f8287e8e49a83981", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "226bdb004e72848777178a9d1f207cbf", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "0e65525f42af427cf75b11bb73781b33", "ParentID": "357077e9405b2a7ba50198bbed8bd5f9" }, + { + "ID": "60b5234946cf59e5c3b772aa53c799c7", + "TypeName": "FlaxEngine.Camera", + "ParentID": "d1a76c334a514c99f8f5b2bd81abae2c", + "Name": "Camera2", + "Transform": { + "Translation": { + "X": 0.0, + "Y": 22.0, + "Z": 0.0 + } + }, + "StaticFlags": 0, + "Layer": 1, + "Near": 1.0, + "RenderLayersMask": 4294967294 + }, + { + "ID": "6c34c7e34f64b15cba517c9e0dfa7f17", + "TypeName": "FlaxEngine.EmptyActor", + "ParentID": "60b5234946cf59e5c3b772aa53c799c7", + "Name": "WeaponHolder", + "Transform": { + "Orientation": { + "X": 0.0, + "Y": -1.0, + "Z": 0.0, + "W": -4.371138828673793e-8 + } + }, + "Layer": 1 + }, + { + "ID": "1a36391a4ab12e0abce7ceafcd0f875a", + "TypeName": "FlaxEngine.StaticModel", + "ParentID": "6c34c7e34f64b15cba517c9e0dfa7f17", + "Name": "DummyWeapon", + "Transform": { + "Translation": { + "X": -10.356758117675782, + "Y": -17.271102905273439, + "Z": -16.543827056884767 + }, + "Orientation": { + "X": -2.9248639066281613e-8, + "Y": 0.7431446313858032, + "Z": -0.6691308617591858, + "W": -3.24838822507445e-8 + }, + "Scale": { + "X": 0.10999999940395355, + "Y": 0.550000011920929, + "Z": 0.10999999940395355 + } + }, + "StaticFlags": 0, + "Layer": 1, + "Model": "223aa9894e90973780ab508621517526", + "Buffer": { + "Entries": [ + { + "Material": "a75d425f40ef7ba5df0fdb8d470e8a78", + "ShadowsMode": 3, + "Visible": true, + "ReceiveDecals": true + } + ] + } + }, { "ID": "89c02cd64b640185d9947ab451453c4c", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "8bd80bca49ac35da66aabaa2e473851d", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "f3d1646e45ab7a13907723b38fae2347", "ParentID": "6c66fa4a4a5de8998eb84388d1648317" }, { "ID": "eebdb91647732ad3dfc7528c978cd19c", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "d9d61d314ad79d49ba08059cef50f802", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "493fc7734584b9be62b4d3b8493416fe", "ParentID": "6c66fa4a4a5de8998eb84388d1648317" }, { "ID": "3e0f83fe407b2d9ed7c734a62fad0826", - "PrefabID": "2d0e518b47d735c98312dd87cc42d6d7", - "PrefabObjectID": "b377cc03418270d87e8a5b92cb5374ea", + "PrefabID": "669786bb4ff6bc8d85f94eb2c1e999ef", + "PrefabObjectID": "3e55bd9a46fb749db3e7e7993eb6d78c", "ParentID": "6c66fa4a4a5de8998eb84388d1648317" } ] diff --git a/Content/Settings/EngineSettings/BuildSettings.json b/Content/Settings/EngineSettings/BuildSettings.json index 84be040..37dc02f 100644 --- a/Content/Settings/EngineSettings/BuildSettings.json +++ b/Content/Settings/EngineSettings/BuildSettings.json @@ -23,10 +23,7 @@ "Name": "Win64", "Output": "Output\\WindowsDevelopment", "Platform": 2, - "Mode": 1, - "CustomDefines": null, - "PreBuildAction": null, - "PostBuildAction": null + "Mode": 1 } ] }, @@ -37,10 +34,7 @@ "Name": "Win64", "Output": "Output\\WindowsRelease", "Platform": 2, - "Mode": 2, - "CustomDefines": null, - "PreBuildAction": null, - "PostBuildAction": null + "Mode": 2 } ] } diff --git a/Content/Settings/EngineSettings/InputSettings.json b/Content/Settings/EngineSettings/InputSettings.json index d56f839..2ecde14 100644 --- a/Content/Settings/EngineSettings/InputSettings.json +++ b/Content/Settings/EngineSettings/InputSettings.json @@ -1,7 +1,7 @@ { "ID": "8ec53dba4c238bfbea1d62922e612a4d", "TypeName": "FlaxEditor.Content.Settings.InputSettings", - "EngineBuild": 6219, + "EngineBuild": 6330, "Data": { "ActionMappings": [ { @@ -85,7 +85,7 @@ "PositiveButton": 0, "NegativeButton": 0, "DeadZone": 0.0, - "Sensitivity": 0.08, + "Sensitivity": 0.02, "Gravity": 1.0, "Scale": 1.0, "Snap": false @@ -97,7 +97,7 @@ "PositiveButton": 0, "NegativeButton": 0, "DeadZone": 0.0, - "Sensitivity": 0.08, + "Sensitivity": 0.02, "Gravity": 1.0, "Scale": 1.0, "Snap": false diff --git a/Content/Settings/EngineSettings/LayersAndTagsSettings.json b/Content/Settings/EngineSettings/LayersAndTagsSettings.json index 15420d2..e7cb0fa 100644 --- a/Content/Settings/EngineSettings/LayersAndTagsSettings.json +++ b/Content/Settings/EngineSettings/LayersAndTagsSettings.json @@ -1,42 +1,12 @@ { "ID": "60078f6a489f7c57e47fce83afaada66", "TypeName": "FlaxEditor.Content.Settings.LayersAndTagsSettings", - "EngineBuild": 6219, + "EngineBuild": 6330, "Data": { "Tags": [], "Layers": [ "DefaultLayer", - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null + "WeaponLayer" ] } } \ No newline at end of file diff --git a/Content/Settings/EngineSettings/TimeSettings.json b/Content/Settings/EngineSettings/TimeSettings.json index a1b0432..8141f5d 100644 --- a/Content/Settings/EngineSettings/TimeSettings.json +++ b/Content/Settings/EngineSettings/TimeSettings.json @@ -1,9 +1,9 @@ { "ID": "a55dc3c04da4ea3744b7f1994565beac", "TypeName": "FlaxEditor.Content.Settings.TimeSettings", - "EngineBuild": 6330, + "EngineBuild": 6228, "Data": { - "UpdateFPS": 0.0, + "UpdateFPS": 120.0, "PhysicsFPS": 120.0, "DrawFPS": 120.0, "TimeScale": 1.0, diff --git a/Content/Settings/EngineSettings/WindowsPlatformSettings.json b/Content/Settings/EngineSettings/WindowsPlatformSettings.json index 1f8dc5d..eae44a3 100644 --- a/Content/Settings/EngineSettings/WindowsPlatformSettings.json +++ b/Content/Settings/EngineSettings/WindowsPlatformSettings.json @@ -9,7 +9,6 @@ "ResizableWindow": true, "RunInBackground": true, "ForceSingleInstance": false, - "OverrideIcon": null, "SupportDX12": true, "SupportDX11": true, "SupportDX10": false, diff --git a/Source/Game/PlayerInputLocal.cs b/Source/Game/PlayerInputLocal.cs index 6c27034..e0ba953 100644 --- a/Source/Game/PlayerInputLocal.cs +++ b/Source/Game/PlayerInputLocal.cs @@ -15,6 +15,10 @@ namespace Game public bool IsRecording { get { return demoFileStream != null; } } + public PlayerInputLocal() + { + } + public PlayerInputLocal(string demoPath) { demoFileStream = File.Open(demoPath, FileMode.Create, FileAccess.Write); diff --git a/Source/Game/PlayerMovement.cs b/Source/Game/PlayerMovement.cs index 861d3ff..53280f5 100644 --- a/Source/Game/PlayerMovement.cs +++ b/Source/Game/PlayerMovement.cs @@ -70,8 +70,8 @@ namespace Game } else { - //input = new PlayerInputLocal(); - input = new PlayerInputDemo(@"C:\dev\GoakeFlax\testdemo.gdem"); //playback + input = new PlayerInputLocal(); + //input = new PlayerInputDemo(@"C:\dev\GoakeFlax\testdemo.gdem"); //playback //input = new PlayerInputDemo(@"C:\dev\GoakeFlax\testdemo_desync.gdem"); //playback }