Skip to content
Snippets Groups Projects
Commit eae0ee86 authored by Ehret's avatar Ehret
Browse files

scale ray to the length of interaction

parent 72b5b6df
No related branches found
No related tags found
1 merge request!41add an interaction ray and make VRInteractionComponent derive from WidgetInteractionComponent so it can also handle UMG widgets
No preview for this file type
......@@ -177,6 +177,7 @@ void UBasicVRInteractionComponent::Initialize(USceneComponent* RayEmitter, float
MaxClickDistance = InMaxClickDistance;
InteractionRay->AttachToComponent(RayEmitter, FAttachmentTransformRules::KeepRelativeTransform);
InteractionRay->SetRelativeScale3D(FVector(MaxClickDistance/100.0f, 1.0f, 1.0f)); //the ray model has a length of 100cm
this->AttachToComponent(RayEmitter, FAttachmentTransformRules::KeepRelativeTransform);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment