Update VRE, Experiments with Edge Detection Mat, LibraryCabinet, Attempts to fix mirrored Hand Collision
This commit is contained in:
parent
548cc55bc4
commit
5e674c3db9
46 changed files with 110 additions and 57 deletions
|
@ -693,7 +693,7 @@ void UHandSocketComponent::OnRegister()
|
|||
{
|
||||
if (HandPreviewMaterial)
|
||||
{
|
||||
HandVisualizerComponent->SetMaterial(0, (UMaterialInterface*)HandPreviewMaterial);
|
||||
HandVisualizerComponent->SetMaterial(0, HandPreviewMaterial);
|
||||
}
|
||||
HandVisualizerComponent->SetSkinnedAssetAndUpdate(VisualizationMesh);
|
||||
}
|
||||
|
|
|
@ -283,6 +283,21 @@ UPrimitiveComponent* FBPActorGripInformation::GetGrippedComponent() const
|
|||
return Cast<UPrimitiveComponent>(GrippedObject);
|
||||
}
|
||||
|
||||
|
||||
UPrimitiveComponent* FBPActorGripInformation::GetGripPrimitiveComponent() const
|
||||
{
|
||||
UPrimitiveComponent* RootComp = nullptr;
|
||||
|
||||
if (GripTargetType == EGripTargetType::ActorGrip)
|
||||
{
|
||||
RootComp = Cast<UPrimitiveComponent>(GetGrippedActor()->GetRootComponent());
|
||||
}
|
||||
else
|
||||
RootComp = GetGrippedComponent();
|
||||
|
||||
return RootComp;
|
||||
}
|
||||
|
||||
bool FBPActorGripInformation::operator==(const UPrimitiveComponent* Other) const
|
||||
{
|
||||
if (Other && GrippedObject && GrippedObject == (const UObject*)Other)
|
||||
|
|
|
@ -586,6 +586,11 @@ bool UVRExpansionFunctionLibrary::IsActiveGrip(const FBPActorGripInformation& Gr
|
|||
return Grip.IsActive();
|
||||
}
|
||||
|
||||
UPrimitiveComponent* UVRExpansionFunctionLibrary::GetGripPrimitiveTarget(const FBPActorGripInformation& Grip)
|
||||
{
|
||||
return Grip.GetGripPrimitiveComponent();
|
||||
}
|
||||
|
||||
FTransform_NetQuantize UVRExpansionFunctionLibrary::MakeTransform_NetQuantize(FVector Translation, FRotator Rotation, FVector Scale)
|
||||
{
|
||||
return FTransform_NetQuantize(Rotation, Translation, Scale);
|
||||
|
|
|
@ -465,7 +465,7 @@ public:
|
|||
#if WITH_EDITORONLY_DATA
|
||||
// Material to apply to the hand
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Hand Visualization")
|
||||
TObjectPtr<UMaterial> HandPreviewMaterial;
|
||||
TObjectPtr<UMaterialInterface> HandPreviewMaterial;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -1562,6 +1562,8 @@ public:
|
|||
|
||||
UPrimitiveComponent* GetGrippedComponent() const;
|
||||
|
||||
UPrimitiveComponent* GetGripPrimitiveComponent() const;
|
||||
|
||||
//Check if a grip is the same as another, the only things I check for are the actor / component
|
||||
//This is here for the Find() function from TArray
|
||||
FORCEINLINE bool operator==(const FBPActorGripInformation &Other) const
|
||||
|
|
|
@ -200,6 +200,10 @@ public:
|
|||
UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions")
|
||||
static bool IsActiveGrip(const FBPActorGripInformation& Grip);
|
||||
|
||||
/* Returns the target primitive component if the grip has one (it should always), otherwise it will return invalid */
|
||||
UFUNCTION(BlueprintPure, Category = "VRExpansionFunctions")
|
||||
static UPrimitiveComponent* GetGripPrimitiveTarget(const FBPActorGripInformation& Grip);
|
||||
|
||||
/** Make a transform net quantize from location, rotation and scale */
|
||||
UFUNCTION(BlueprintPure, meta = (Scale = "1,1,1", Keywords = "construct build", NativeMakeFunc), Category = "VRExpansionLibrary|TransformNetQuantize")
|
||||
static FTransform_NetQuantize MakeTransform_NetQuantize(FVector Location, FRotator Rotation, FVector Scale);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue