Skip to content
Snippets Groups Projects
Commit 3ea5666d authored by Timon Römer's avatar Timon Römer
Browse files

Refactors IntenSelect Scoring

parent a58c2187
Branches
No related tags found
1 merge request!87Merge IntenSelect into dev5.3
Showing
with 26 additions and 30 deletions
File added
......@@ -70,17 +70,17 @@ void UIntenSelectComponent::BeginPlay()
{
Super::BeginPlay();
this->InitSplineComponent();
this->InitSplineMeshComponent();
this->InitForwardRayMeshComponent();
this->InitDebugConeMeshComponent();
this->InitInputBindings();
this->InitMaterialParamCollection();
InitSplineComponent();
InitSplineMeshComponent();
InitForwardRayMeshComponent();
InitDebugConeMeshComponent();
InitInputBindings();
InitMaterialParamCollection();
this->SphereCastRadius = CalculateSphereCastRadius();
this->InteractionDistance = this->MaxSelectionDistance;
SphereCastRadius = CalculateSphereCastRadius();
InteractionDistance = MaxSelectionDistance;
this->SetActive(SetActiveOnStart, false);
SetActive(SetActiveOnStart, false);
}
void UIntenSelectComponent::InitInputBindings()
......
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
......
......@@ -21,9 +21,6 @@ protected:
public:
UIntenSelectableCubeScoring();
UPROPERTY(EditAnywhere)
bool DrawDebug = true;
UPROPERTY(EditAnywhere)
bool BackFaceCulling = false;
......
......@@ -21,9 +21,6 @@ protected:
public:
UIntenSelectableCylinderScoring();
UPROPERTY(EditAnywhere)
bool DrawDebug = true;
virtual TPair<FHitResult, float> GetBestPointScorePair(const FVector& ConeOrigin,
const FVector& ConeForwardDirection,
const float ConeBackwardShiftDistance, const float ConeAngle,
......
......@@ -21,9 +21,6 @@ protected:
public:
UIntenSelectableLineScoring();
UPROPERTY(EditAnywhere)
bool DrawDebug = true;
virtual TPair<FHitResult, float> GetBestPointScorePair(const FVector& ConeOrigin,
const FVector& ConeForwardDirection,
const float ConeBackwardShiftDistance, const float ConeAngle,
......
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
......
......@@ -21,9 +21,6 @@ protected:
public:
UIntenSelectableRectangleScoring();
UPROPERTY(EditAnywhere)
bool DrawDebug = true;
UPROPERTY(EditAnywhere)
bool OnlyOutline = false;
......
......@@ -17,6 +17,9 @@ protected:
public:
UIntenSelectableScoring();
UPROPERTY(EditAnywhere)
bool DrawDebug = true;
UPROPERTY(BlueprintReadOnly)
float CurrentScore = 0;
......
......@@ -24,9 +24,6 @@ public:
UPROPERTY(EditAnywhere)
float Radius = 50;
UPROPERTY(EditAnywhere)
bool DrawDebug = true;
virtual TPair<FHitResult, float> GetBestPointScorePair(const FVector& ConeOrigin,
const FVector& ConeForwardDirection,
const float ConeBackwardShiftDistance, const float ConeAngle,
......
......@@ -29,35 +29,47 @@ private:
bool IsGrabbing;
bool IsWidgetInFocus;
FVector WidgetFocusPoint;
FVector LastKnownGrabPoint;
UPROPERTY()
UWidgetComponent* LastFocusedWidget;
UPROPERTY()
TMap<UIntenSelectable*, float> ScoreMap;
UPROPERTY()
TMap<UIntenSelectable*, FHitResult> ContactPointMap;
UPROPERTY()
UIntenSelectable* CurrentSelection;
UPROPERTY()
UIntenSelectable* LastKnownSelection;
UPROPERTY()
FVector LastKnownGrabPoint;
UPROPERTY()
UStaticMeshComponent* DebugConeMeshComponent;
UPROPERTY()
UStaticMeshComponent* ForwardRayMeshComponent;
UPROPERTY()
USplineComponent* SplineComponent;
UPROPERTY()
USplineMeshComponent* SplineMeshComponent;
UPROPERTY()
UMaterialParameterCollectionInstance* ParameterCollectionInstance;
UPROPERTY()
UStaticMesh* DebugConeMesh;
UPROPERTY()
UMaterialInterface* DebugConeMaterial;
UPROPERTY()
UStaticMesh* ForwardRayMesh;
#pragma endregion
#pragma region /** SETTINGS */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment