Skip to content
Snippets Groups Projects
Commit 6b46dca5 authored by Jonathan Ehret's avatar Jonathan Ehret
Browse files

Merge branch '4.26' into '4.27'

add HitActor Interaction bug fix into 4.27

See merge request VR-Group/unreal-development/plugins/rwth-vr-toolkit!11
parents 3a95390a 0a98875a
No related branches found
No related tags found
1 merge request!11add HitActor Interaction bug fix into 4.27
...@@ -63,7 +63,7 @@ void UBasicVRInteractionComponent::BeginInteraction() ...@@ -63,7 +63,7 @@ void UBasicVRInteractionComponent::BeginInteraction()
PressPointerKey(EKeys::LeftMouseButton); PressPointerKey(EKeys::LeftMouseButton);
if (HitActor->Implements<UGrabable>() && Hit->Distance < MaxGrabDistance) if (HitActor && HitActor->Implements<UGrabable>() && Hit->Distance < MaxGrabDistance)
{ {
// call grabable actors function so he reacts to our grab // call grabable actors function so he reacts to our grab
IGrabable::Execute_OnBeginGrab(HitActor); IGrabable::Execute_OnBeginGrab(HitActor);
...@@ -76,7 +76,7 @@ void UBasicVRInteractionComponent::BeginInteraction() ...@@ -76,7 +76,7 @@ void UBasicVRInteractionComponent::BeginInteraction()
// we save the grabbedActor in a general form to access all of AActors functions easily later // we save the grabbedActor in a general form to access all of AActors functions easily later
GrabbedActor = HitActor; GrabbedActor = HitActor;
} }
else if (HitActor->Implements<UClickable>() && Hit->Distance < MaxClickDistance) else if (HitActor && HitActor->Implements<UClickable>() && Hit->Distance < MaxClickDistance)
{ {
IClickable::Execute_OnClick(HitActor, Hit->Location); IClickable::Execute_OnClick(HitActor, Hit->Location);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment