You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Moved all skeletal control nodes to start out Upgrade Note: Modules containing custom animation nodes will need to have a dependency on the new "AnimGraphRuntime" module added to their Build.cs file #codereview lina.halper [CL 2582755 by Michael Noland in Main branch]
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "AnimNode_SkeletalControlBase.h"
|
|
#include "AnimNode_WheelHandler.generated.h"
|
|
|
|
struct FWheelSimulator
|
|
{
|
|
int32 WheelIndex;
|
|
FBoneReference BoneReference;
|
|
FRotator RotOffset;
|
|
FVector LocOffset;
|
|
};
|
|
|
|
/**
|
|
* Simple controller that replaces or adds to the translation/rotation of a single bone.
|
|
*/
|
|
USTRUCT()
|
|
struct ANIMGRAPHRUNTIME_API FAnimNode_WheelHandler : public FAnimNode_SkeletalControlBase
|
|
{
|
|
GENERATED_USTRUCT_BODY()
|
|
|
|
/** Current Asset being played **/
|
|
UPROPERTY(transient)
|
|
class UWheeledVehicleMovementComponent* VehicleSimComponent;
|
|
|
|
TArray<FWheelSimulator> WheelSimulators;
|
|
|
|
FAnimNode_WheelHandler();
|
|
|
|
// FAnimNode_Base interface
|
|
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
|
|
// End of FAnimNode_Base interface
|
|
|
|
// FAnimNode_SkeletalControlBase interface
|
|
virtual void EvaluateBoneTransforms(USkeletalMeshComponent* SkelComp, FCSPose<FCompactPose>& MeshBases, TArray<FBoneTransform>& OutBoneTransforms) override;
|
|
virtual bool IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) override;
|
|
virtual void Update(const FAnimationUpdateContext& Context) override;
|
|
virtual void Initialize(const FAnimationInitializeContext& Context) override;
|
|
// End of FAnimNode_SkeletalControlBase interface
|
|
|
|
private:
|
|
// FAnimNode_SkeletalControlBase interface
|
|
virtual void InitializeBoneReferences(const FBoneContainer& RequiredBones) override;
|
|
// End of FAnimNode_SkeletalControlBase interface
|
|
};
|