Skip to content

Commit a330c72

Browse files
authored
Change kinematic update to pre-simulation (o3de#583)
Signed-off-by: Michał Pełka <[email protected]>
1 parent 281b15e commit a330c72

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Gems/WarehouseAutomation/Code/Source/ConveyorBelt/ConveyorBeltComponent.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ namespace WarehouseAutomation
8080
if (splinePtr)
8181
{
8282
m_splineConsPtr = splinePtr;
83-
m_sceneFinishSimHandler = AzPhysics::SceneEvents::OnSceneSimulationFinishHandler(
83+
m_sceneSimStartHandler = AzPhysics::SceneEvents::OnSceneSimulationStartHandler (
8484
[this]([[maybe_unused]] AzPhysics::SceneHandle sceneHandle, float fixedDeltaTime)
8585
{
8686
SpawnSegments(fixedDeltaTime);
8787
MoveSegmentsPhysically(fixedDeltaTime);
8888
DespawnSegments();
8989
},
9090
aznumeric_cast<int32_t>(AzPhysics::SceneEvents::PhysicsStartFinishSimulationPriority::Components));
91-
sceneInterface->RegisterSceneSimulationFinishHandler(defaultSceneHandle, m_sceneFinishSimHandler);
91+
sceneInterface->RegisterSceneSimulationStartHandler(defaultSceneHandle, m_sceneSimStartHandler);
9292
const auto& [startPoint, endPoint] = GetStartAndEndPointOfBelt(splinePtr);
9393
m_startPoint = startPoint;
9494
m_endPoint = endPoint;
@@ -114,9 +114,9 @@ namespace WarehouseAutomation
114114

115115
void ConveyorBeltComponent::Deactivate()
116116
{
117-
if (m_sceneFinishSimHandler.IsConnected())
117+
if (m_sceneSimStartHandler.IsConnected())
118118
{
119-
m_sceneFinishSimHandler.Disconnect();
119+
m_sceneSimStartHandler.Disconnect();
120120
}
121121
ConveyorBeltRequestBus::Handler::BusDisconnect();
122122
AZ::EntityBus::Handler::BusDisconnect();

Gems/WarehouseAutomation/Code/Source/ConveyorBelt/ConveyorBeltComponent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace WarehouseAutomation
104104

105105
ConveyorBeltComponentConfiguration m_configuration; //!< Configuration of the component
106106

107-
AzPhysics::SceneEvents::OnSceneSimulationFinishHandler m_sceneFinishSimHandler; //!< Handler called after every physics sub-step
107+
AzPhysics::SceneEvents::OnSceneSimulationStartHandler m_sceneSimStartHandler; //!< Handler called after every physics sub-step
108108
AZStd::deque<AZStd::pair<float, AzPhysics::SimulatedBodyHandle>> m_conveyorSegments; //!< Cache of created segments
109109
float m_textureOffset = 0.0f; //!< Current offset of the texture during animation
110110
AZ::ConstSplinePtr m_splineConsPtr{ nullptr }; //!< Pointer to the spline

0 commit comments

Comments
 (0)