Browse Source

Updates and fixes to the weapon effects bus, and hooking up the energy ball

Signed-off-by: kberg-amzn <[email protected]>
kberg-amzn 2 years ago
parent
commit
18cf3b1d40

+ 3 - 3
Gem/Code/Include/WeaponNotificationBus.h

@@ -19,13 +19,13 @@ namespace MultiplayerSample
         virtual ~WeaponNotifications() = default;
 
         //! Called on a local player that has activated a weapon.
-        virtual void OnWeaponActivate([[maybe_unused]] const AZ::Transform& transform) {}
+        virtual void OnWeaponActivate([[maybe_unused]] AZ::EntityId shooterEntityId, [[maybe_unused]] const AZ::Transform& transform) {}
 
         //! Called on a local player that has predictively impacted something with a weapon.
-        virtual void OnWeaponImpact([[maybe_unused]] const AZ::Transform& transform) {}
+        virtual void OnWeaponImpact([[maybe_unused]] AZ::EntityId shooterEntityId, [[maybe_unused]] const AZ::Transform& transform, [[maybe_unused]] AZ::EntityId hitEntityId) {}
 
         //! Called on a local player that has confirmed damaged something with a weapon.
-        virtual void OnWeaponDamage([[maybe_unused]] const AZ::Transform& transform) {}
+        virtual void OnWeaponDamage([[maybe_unused]] AZ::EntityId shooterEntityId, [[maybe_unused]] const AZ::Transform& transform, [[maybe_unused]] AZ::EntityId hitEntityId) {}
 
         //! Called on a local player that has been confirmed to hit a player with a weapon.
         virtual void OnConfirmedHitPlayer([[maybe_unused]] AZ::EntityId byPlayerEntity, [[maybe_unused]] AZ::EntityId otherPlayerEntity) {}

+ 8 - 1
Gem/Code/Source/Components/Multiplayer/EnergyBallComponent.cpp

@@ -12,6 +12,7 @@
 #include <MultiplayerSampleTypes.h>
 #include <AzCore/Component/TransformBus.h>
 #include <AzFramework/Physics/RigidBodyBus.h>
+#include <WeaponNotificationBus.h>
 
 #if AZ_TRAIT_CLIENT
 #   include <PopcornFX/PopcornFXBus.h>
@@ -124,7 +125,13 @@ namespace MultiplayerSample
             {
                 shouldTerminate = true;
 
-                Multiplayer::ConstNetworkEntityHandle handle = Multiplayer::GetMultiplayer()->GetNetworkEntityManager()->GetEntity(result.m_netEntityId);
+                // The hit normal appears to be invalid (0, 0, 0) coming out of overlaps like we use in our gather
+                // Default to using the travel direction
+                const AZ::Transform hitTransform = AZ::Transform::CreateLookAt(result.m_position, result.m_position - m_direction, AZ::Transform::Axis::ZPositive);
+                const Multiplayer::ConstNetworkEntityHandle handle = Multiplayer::GetNetworkEntityManager()->GetEntity(result.m_netEntityId);
+                const AZ::EntityId hitEntityId = handle.Exists() ? handle.GetEntity()->GetId() : AZ::EntityId();
+                WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponImpact, GetEntity()->GetId(), hitTransform, hitEntityId);
+
                 if (handle.Exists())
                 {
                     // Presently set to 1 until we capture falloff range

+ 1 - 1
Gem/Code/Source/Components/Multiplayer/EnergyCannonComponent.cpp

@@ -85,7 +85,7 @@ namespace MultiplayerSample
                 const AZ::Transform& cannonTm = GetEntity()->GetTransform()->GetWorldTM();
                 const AZ::Vector3 forward = cannonTm.TransformVector(AZ::Vector3::CreateAxisY(-1.f));
                 const AZ::Vector3 effectOffset = GetFiringEffect().GetEffectOffset();
-                ballComponent->RPC_LaunchBall(cannonTm.GetTranslation() + cannonTm.TransformVector(effectOffset), forward, GetNetEntityId());
+                ballComponent->RPC_LaunchBall(cannonTm.TransformPoint(effectOffset), forward, GetNetEntityId());
 
                 // Enqueue our ball kill event
                 m_killEvent.Enqueue(GetBallLifetimeMs(), false);

+ 13 - 10
Gem/Code/Source/Components/NetworkWeaponsComponent.cpp

@@ -45,19 +45,19 @@ namespace MultiplayerSample
             OnWeaponDamage,
             OnConfirmedHitPlayer);
 
-        void OnWeaponActivate(const AZ::Transform& transform) override
+        void OnWeaponActivate(AZ::EntityId shooterEntityId, const AZ::Transform& transform) override
         {
-            Call(FN_OnWeaponActivate, transform);
+            Call(FN_OnWeaponActivate, shooterEntityId, transform);
         }
 
-        void OnWeaponImpact(const AZ::Transform& transform) override
+        void OnWeaponImpact(AZ::EntityId shooterEntityId, const AZ::Transform& transform, AZ::EntityId hitEntityId) override
         {
-            Call(FN_OnWeaponImpact, transform);
+            Call(FN_OnWeaponImpact, shooterEntityId, transform, hitEntityId);
         }
 
-        void OnWeaponDamage(const AZ::Transform& transform) override
+        void OnWeaponDamage(AZ::EntityId shooterEntityId, const AZ::Transform& transform, AZ::EntityId hitEntityId) override
         {
-            Call(FN_OnWeaponDamage, transform);
+            Call(FN_OnWeaponDamage, shooterEntityId, transform, hitEntityId);
         }
 
         void OnConfirmedHitPlayer(AZ::EntityId byPlayerEntity, AZ::EntityId otherPlayerEntity) override
@@ -183,7 +183,7 @@ namespace MultiplayerSample
         }
 
         m_onWeaponActivateEvent.Signal(activationInfo);
-        WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponActivate, activationInfo.m_activateEvent.m_initialTransform);
+        WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponActivate, GetEntity()->GetId(), activationInfo.m_activateEvent.m_initialTransform);
 
 #if AZ_TRAIT_CLIENT
         if (cl_WeaponsDrawDebug && m_debugDraw)
@@ -237,7 +237,9 @@ namespace MultiplayerSample
         for (const auto& hitEntity : hitInfo.m_hitEvent.m_hitEntities)
         {
             const AZ::Transform hitTransform = AZ::Transform::CreateLookAt(hitEntity.m_hitPosition, hitEntity.m_hitPosition + hitEntity.m_hitNormal, AZ::Transform::Axis::ZPositive);
-            WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponImpact, hitTransform);
+            const Multiplayer::ConstNetworkEntityHandle handle = Multiplayer::GetNetworkEntityManager()->GetEntity(hitEntity.m_hitNetEntityId);
+            const AZ::EntityId hitEntityId = handle.Exists() ? handle.GetEntity()->GetId() : AZ::EntityId();
+            WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponImpact, GetEntity()->GetId(), hitTransform, hitEntityId);
 
 #if AZ_TRAIT_CLIENT
 	        if (cl_WeaponsDrawDebug && m_debugDraw)
@@ -320,7 +322,9 @@ namespace MultiplayerSample
         for (const auto& hitEntity : hitInfo.m_hitEvent.m_hitEntities)
         {
             const AZ::Transform hitTransform = AZ::Transform::CreateLookAt(hitEntity.m_hitPosition, hitEntity.m_hitPosition + hitEntity.m_hitNormal, AZ::Transform::Axis::ZPositive);
-            WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponDamage, hitTransform);
+            const Multiplayer::ConstNetworkEntityHandle handle = Multiplayer::GetNetworkEntityManager()->GetEntity(hitEntity.m_hitNetEntityId);
+            const AZ::EntityId hitEntityId = handle.Exists() ? handle.GetEntity()->GetId() : AZ::EntityId();
+            WeaponNotificationBus::Broadcast(&WeaponNotificationBus::Events::OnWeaponDamage, GetEntity()->GetId(), hitTransform, hitEntityId);
 
 #if AZ_TRAIT_CLIENT
             if (cl_WeaponsDrawDebug && m_debugDraw)
@@ -334,7 +338,6 @@ namespace MultiplayerSample
                 );
             }
 
-            Multiplayer::ConstNetworkEntityHandle handle = Multiplayer::GetMultiplayer()->GetNetworkEntityManager()->GetEntity(hitEntity.m_hitNetEntityId);
             if (handle.Exists())
             {
                 if (const AZ::Entity* entity = handle.GetEntity())

+ 1 - 1
Gem/Code/Source/Effects/GameEffect.cpp

@@ -149,7 +149,7 @@ namespace MultiplayerSample
     void GameEffect::TriggerEffect([[maybe_unused]] const AZ::Transform& transform) const
     {
 #if AZ_TRAIT_CLIENT
-        const AZ::Vector3 offsetPosition = transform.GetTranslation() + transform.TransformVector(m_effectOffset);
+        const AZ::Vector3 offsetPosition = transform.TransformPoint(m_effectOffset);
         AZ::Transform transformOffset = transform;
         transformOffset.SetTranslation(offsetPosition);
         if (m_emitter != nullptr)

+ 563 - 40
Levels/GameplayTest/GameplayTest.prefab

@@ -109,6 +109,7 @@
                     "Entity_[1800029023887]",
                     "Entity_[1808618958479]",
                     "Entity_[2009119671826]",
+                    "Entity_[6269723213373]",
                     "Entity_[2004824704530]",
                     "Entity_[2000529737234]",
                     "Instance_[9344504187970]/ContainerEntity",
@@ -11439,6 +11440,568 @@
                 }
             }
         },
+        "Entity_[6269723213373]": {
+            "Id": "Entity_[6269723213373]",
+            "Name": "Ramp",
+            "Components": {
+                "Component_[10397256755443470613]": {
+                    "$type": "EditorOnlyEntityComponent",
+                    "Id": 10397256755443470613
+                },
+                "Component_[11050547822997230207]": {
+                    "$type": "EditorDisabledCompositionComponent",
+                    "Id": 11050547822997230207
+                },
+                "Component_[11987017710858805623]": {
+                    "$type": "EditorWhiteBoxComponent",
+                    "Id": 11987017710858805623,
+                    "WhiteBoxData": "T01UQQgAAAAMAAAAEgAAAAAWnTRrwAAAAL+YjLk/tu04wAAAAL9cALg/tu04wAS38D9cALg/nTRrwAS38D+YjLk/l3FuwAAAAL+AUVU8AAAAPwAAAL+AUVU8AAAAPwS38D+AUVU8l3FuwAS38D+AUVU8+BYCAQAYAAUEAgAVAQcAAAAGAgEIAwEbAgkFAAEfAwsMBgIeBwgOBQIaBgYKBwIQBQMSBAMUBQQPBwMZBAoWAQQdBQcRBAQBAQUXBAUiAAocAgYhBgkNBQYDAgcgAwgjBwsLBggHAwkTBwoJAAtYDrbtWEAAAIA/TpqFQDAZc7+27VhABLewv7btWEAAAIA/TpqFQAAAgD+27VhABLewv06ahUAEt7C/tu1YQLgAcL9OmoVAAACAPzAZc78Et7C/AAAAAAS3sL/MOIdAdFX5PgAAAAAAAIA/AAAAAAS3sL/MOIdABLewvwAAAAAAAIA/zDiHQAAAgD8AAAAAdFX5Psw4h0AEt7C/dFX5PgAAgD+27VhAuABwvwAAAAAAAIA/zDiHQHRV+T627VhAuABwv8w4h0B0Vfk+MBlzvwAAgD+27VhABLewvwAAAAB0Vfk+AAAAAAAAgD+27VhABLewv06ahUAwGXO/dFX5PgS3sL8AAAAAdFX5Pk6ahUAwGXO/dFX5PgS3sL8wGXO/AACAP+AGCRUbHxkdISPoBgQIDhIWGBwVIBsiHygWxyl8PAAAAIA9+H8/xyl8PAAAAAA9+H8/AAAAgAAAAID//3+/AAAAAAAAAAD//3+/AAAAAP//f78AAAAAAAAAgAAAgL8AAAAAiF7GPgAAAABPAWw/iF7GPgAAAABPAWw/AAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAZNd/vwAAAAAmLBA9ZNd/vwAAAAAmLBA9wsATdmVydGV4LWhpZGRlbi1wcm9wcwEAAAAAxsANcG9seWdvbi1wcm9wc8QAAAAMAAAABgAAAAIAAAAGAAAABwAAAAUAAAACAAAABAAAAAUAAAAEAAAAAgAAAAQAAAAFAAAACwAAAAIAAAAKAAAACwAAAAMAAAACAAAAAgAAAAMAAAAKAAAAAgAAAAoAAAALAAAAAgAAAAIAAAACAAAAAwAAAAkAAAACAAAACAAAAAkAAAABAAAAAgAAAAAAAAABAAAACAAAAAIAAAAIAAAACQAAAAAAAAACAAAAAAAAAAEAAAAHAAAAAgAAAAYAAAAHAAAAHAA=",
+                    "RenderData": {
+                        "Faces": [
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        -0.5,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        4.17508602142334,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        -0.5,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        1.8805851936340332,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Normal": [
+                                    0.015390819869935513,
+                                    -0.0,
+                                    0.9998815655708313
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        -0.5,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        4.17508602142334,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        1.8805851936340332,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        1.8805851936340332,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        4.17508602142334,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Normal": [
+                                    0.015390819869935513,
+                                    0.0,
+                                    0.9998815655708313
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        4.225683212280273,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        0.5,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        0.5,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        1.0
+                                    ]
+                                },
+                                "Normal": [
+                                    -0.0,
+                                    -0.0,
+                                    -0.9999999403953552
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        4.225683212280273,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        0.5,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        4.225683212280273,
+                                        1.0
+                                    ]
+                                },
+                                "Normal": [
+                                    0.0,
+                                    0.0,
+                                    -0.9999999403953552
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        4.225683212280273,
+                                        0.4869800806045532
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        0.5,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        0.4869800806045532
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        -0.5,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -0.9375109672546387
+                                    ]
+                                },
+                                "Normal": [
+                                    0.0,
+                                    -0.9999999403953552,
+                                    0.0
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        4.225683212280273,
+                                        0.4869800806045532
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        -0.5,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -0.9375109672546387
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        -0.5,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        4.17508602142334,
+                                        -0.9496030807495117
+                                    ]
+                                },
+                                "Normal": [
+                                    -0.0,
+                                    -1.0,
+                                    0.0
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        0.5,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        0.5,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        1.8805851936340332,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Normal": [
+                                    0.3874399662017822,
+                                    0.0,
+                                    0.9218949675559998
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        0.5,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        1.8805851936340332,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        -0.5,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        1.0
+                                    ]
+                                },
+                                "Normal": [
+                                    0.3874399662017822,
+                                    0.0,
+                                    0.9218949675559998
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        0.5,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        0.4869800806045532
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        4.225683212280273,
+                                        0.4869800806045532
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        1.8805851936340332,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        4.17508602142334,
+                                        -0.9496030807495117
+                                    ]
+                                },
+                                "Normal": [
+                                    0.0,
+                                    1.0,
+                                    0.0
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        0.5,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.0,
+                                        0.4869800806045532
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        1.8805851936340332,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        4.17508602142334,
+                                        -0.9496030807495117
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -2.8895087242126465,
+                                        1.8805851936340332,
+                                        1.4375109672546387
+                                    ],
+                                    "UV": [
+                                        3.3895087242126465,
+                                        -0.9375109672546387
+                                    ]
+                                },
+                                "Normal": [
+                                    0.0,
+                                    1.0,
+                                    0.0
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.4869800806045532,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        -0.5,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.4869800806045532,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        -0.5,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        -0.9496030807495117,
+                                        1.0
+                                    ]
+                                },
+                                "Normal": [
+                                    -0.999380350112915,
+                                    0.0,
+                                    0.03519835323095322
+                                ]
+                            },
+                            {
+                                "Vertex1": {
+                                    "Position": [
+                                        -3.7256829738616943,
+                                        1.8805851936340332,
+                                        0.013019919395446777
+                                    ],
+                                    "UV": [
+                                        0.4869800806045532,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Vertex2": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        -0.5,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        -0.9496030807495117,
+                                        1.0
+                                    ]
+                                },
+                                "Vertex3": {
+                                    "Position": [
+                                        -3.675086259841919,
+                                        1.8805851936340332,
+                                        1.4496030807495117
+                                    ],
+                                    "UV": [
+                                        -0.9496030807495117,
+                                        -1.3805851936340332
+                                    ]
+                                },
+                                "Normal": [
+                                    -0.999380350112915,
+                                    0.0,
+                                    0.03519835323095322
+                                ]
+                            }
+                        ]
+                    }
+                },
+                "Component_[12295523401034242674]": {
+                    "$type": "EditorVisibilityComponent",
+                    "Id": 12295523401034242674
+                },
+                "Component_[13084616973584100498]": {
+                    "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+                    "Id": 13084616973584100498,
+                    "Parent Entity": "Entity_[356758116574]",
+                    "Transform Data": {
+                        "Translate": [
+                            -6.851195335388184,
+                            -11.523387908935547,
+                            7.243025779724121
+                        ],
+                        "Rotate": [
+                            -89.9853286743164,
+                            -1.0297627449035645,
+                            -89.184326171875
+                        ],
+                        "UniformScale": 2.8766722679138184
+                    }
+                },
+                "Component_[16669350028946059581]": {
+                    "$type": "EditorWhiteBoxColliderComponent",
+                    "Id": 16669350028946059581,
+                    "Configuration": {
+                        "MaterialSlots": {
+                            "Slots": [
+                                {
+                                    "Name": "Entire object"
+                                }
+                            ]
+                        },
+                        "propertyVisibilityFlags": 235
+                    },
+                    "MeshData": {
+                        "CookedData": "TlhTAU1FU0gPAAAAAAAAAAYAAAAIAAAADAAAAJ00a8AAAAC/mIy5P7btOMAAAAC/XAC4P7btOMAEt/A/XAC4P500a8AEt/A/mIy5P5dxbsAEt/A/gFFVPAAAAD8Et/A/gFFVPAAAAD8AAAC/gFFVPJdxbsAAAAC/gFFVPAcGAQYFAgYCAQQFBgQGBwUDAgUEAwcBAAQAAwQHAAACAwABAgsAAAAEBgcCAwkIBQsKAQBSVFJFAgAAAMh5bsDFIAC/WSBNPAAAAADFIAA/ZsfwP/qcuT8AAAAAAACAPwAAgD8AAIA/AACAP4RBhzh8bBg4cQO4NwAAAAAEAAAAAQAAAAEAAAAEAAAAAQAAAAAAAADIeW7AyHluwMh5bsDIeW7AxSAAv8UgAL+ipvA/xSAAv1kgTTxZIE08WSBNPFkgTTzFIAA/xSAAP8UgAD+F5TjAZsfwP2bH8D9mx/A/ZsfwP74QuD+ngl08+py5P/qcuT8FAAAAYwAAAKMAAADpAAAAl3FuNZdxbsAAAAC/gFFVPAAAAD8Et/A/mIy5PwwAAAAYGDAYMDAYMDAYMBg="
+                    }
+                },
+                "Component_[2482608405239556663]": {
+                    "$type": "EditorLockComponent",
+                    "Id": 2482608405239556663
+                },
+                "Component_[3178633580050940733]": {
+                    "$type": "EditorEntityIconComponent",
+                    "Id": 3178633580050940733
+                },
+                "Component_[4537987012049413452]": {
+                    "$type": "EditorInspectorComponent",
+                    "Id": 4537987012049413452
+                },
+                "Component_[4551674752616433750]": {
+                    "$type": "EditorEntitySortComponent",
+                    "Id": 4551674752616433750
+                },
+                "Component_[7900137566441380515]": {
+                    "$type": "EditorPendingCompositionComponent",
+                    "Id": 7900137566441380515
+                }
+            }
+        },
         "Entity_[685366598502]": {
             "Id": "Entity_[685366598502]",
             "Name": "Gem Spawn Point",
@@ -12540,46 +13103,6 @@
                     "op": "replace",
                     "path": "/ContainerEntity/Components/Component_[16896350622714100755]/Transform Data/Rotate/2",
                     "value": -94.2628936767578
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ColliderConfiguration/MaterialSlots/Slots/0/Name",
-                    "value": "base_MAT"
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Asset/assetId/guid",
-                    "value": "{251F7A49-FA34-57EC-919D-399EAF8F9770}"
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Asset/assetId/subId",
-                    "value": 1397975047
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Asset/assetHint",
-                    "value": "spacecannon/spacecannon.pxmesh"
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Configuration/PhysicsAsset/assetId/guid",
-                    "value": "{251F7A49-FA34-57EC-919D-399EAF8F9770}"
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Configuration/PhysicsAsset/assetId/subId",
-                    "value": 1397975047
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Configuration/PhysicsAsset/loadBehavior",
-                    "value": "QueueLoad"
-                },
-                {
-                    "op": "replace",
-                    "path": "/Entities/Entity_[660556807508]/Components/Component_[9112722425705082704]/ShapeConfiguration/PhysicsAsset/Configuration/PhysicsAsset/assetHint",
-                    "value": "spacecannon/spacecannon.pxmesh"
                 }
             ]
         },

+ 65 - 0
Prefabs/Energy_Cannon_with_Energy_Ball.prefab

@@ -187,6 +187,71 @@
                     "$type": "EditorLockComponent",
                     "Id": 7697210517306281973
                 },
+                "Component_[8308919018390390778]": {
+                    "$type": "EditorScriptCanvasComponent",
+                    "Id": 8308919018390390778,
+                    "configuration": {
+                        "sourceHandle": {
+                            "id": "{6EA0260B-0747-51BF-944D-BE4B312FC90C}",
+                            "path": "scriptcanvas/WeaponImpactDecal.scriptcanvas"
+                        },
+                        "sourceName": "WeaponImpactDecal.scriptcanvas",
+                        "propertyOverrides": {
+                            "source": {
+                                "id": "{6EA0260B-0747-51BF-944D-BE4B312FC90C}",
+                                "path": "scriptcanvas/WeaponImpactDecal.scriptcanvas"
+                            },
+                            "variables": [
+                                {
+                                    "Datum": {
+                                        "isOverloadedStorage": false,
+                                        "scriptCanvasType": {
+                                            "m_type": 4,
+                                            "m_azType": "{FC3DA616-174B-48FD-9BFB-BC277132FB47}"
+                                        },
+                                        "isNullPointer": false,
+                                        "$type": "MultiplayerSample::SpawnDecalConfig",
+                                        "value": {
+                                            "LifeTime": 2.0
+                                        }
+                                    },
+                                    "VariableId": {
+                                        "m_id": "{1850E939-4A77-4323-807E-6EFF953D8810}"
+                                    },
+                                    "VariableName": "Weapon Impact Decal Config",
+                                    "InitialValueSource": 1
+                                }
+                            ],
+                            "overrides": [
+                                {
+                                    "Datum": {
+                                        "isOverloadedStorage": false,
+                                        "scriptCanvasType": {
+                                            "m_type": 4,
+                                            "m_azType": "{FC3DA616-174B-48FD-9BFB-BC277132FB47}"
+                                        },
+                                        "isNullPointer": false,
+                                        "$type": "MultiplayerSample::SpawnDecalConfig",
+                                        "value": {
+                                            "Scale": 2.0,
+                                            "Opacity": 0.800000011920929,
+                                            "LifeTime": 4.0,
+                                            "FadeTime": 2.0
+                                        }
+                                    },
+                                    "InputControlVisibility": {
+                                        "Value": 850104567
+                                    },
+                                    "VariableId": {
+                                        "m_id": "{1850E939-4A77-4323-807E-6EFF953D8810}"
+                                    },
+                                    "VariableName": "Weapon Impact Decal Config",
+                                    "InitialValueSource": 1
+                                }
+                            ]
+                        }
+                    }
+                },
                 "Component_[8670461081840355986]": {
                     "$type": "EditorInspectorComponent",
                     "Id": 8670461081840355986,

File diff suppressed because it is too large
+ 560 - 297
scriptcanvas/WeaponImpactDecal.scriptcanvas


Some files were not shown because too many files changed in this diff