You've already forked LuckyWorld
WIP - Architecture for brute force animation
+ sequence look / extend / grab / drop
This commit is contained in:
@ -14,6 +14,7 @@ void URobotPilotComponent::BeginPlay()
|
||||
|
||||
// Reference owning robot
|
||||
RobotOwner = Cast<ARobotPawn>(GetOwner());
|
||||
InitPilotComponent();
|
||||
}
|
||||
|
||||
void URobotPilotComponent::TickComponent(float DeltaTime, enum ELevelTick TickType,
|
||||
@ -24,18 +25,13 @@ void URobotPilotComponent::TickComponent(float DeltaTime, enum ELevelTick TickTy
|
||||
|
||||
void URobotPilotComponent::InitPilotComponent()
|
||||
{
|
||||
if (RobotOwner.IsValid() && RobotOwner->PhysicSceneProxy.IsValid())
|
||||
if (RobotOwner.Get() && RobotOwner->PhysicSceneProxy.Get())
|
||||
{
|
||||
RobotOwner->PhysicSceneProxy->BindPostPhysicStepDelegate(this, &URobotPilotComponent::AnimateActuators);
|
||||
RobotOwner->PhysicSceneProxy->BindPostPhysicStepDelegate(this, &URobotPilotComponent::PostPhysicStepUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
void URobotPilotComponent::StartAnimation(const FRobotActuators& NewAnimationTarget)
|
||||
void URobotPilotComponent::PostPhysicStepUpdate(const float SimulationTime)
|
||||
{
|
||||
AnimTargetRobotActuators = NewAnimationTarget;
|
||||
}
|
||||
|
||||
void URobotPilotComponent::AnimateActuators(float SimulationTime)
|
||||
{
|
||||
// Override in each dedicated RobotPilotComponent
|
||||
// Overriden in each dedicated RobotPilotComponent
|
||||
}
|
||||
|
Reference in New Issue
Block a user