Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RWTH VR Toolkit
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
RWTH VR Toolkit
Commits
6aa47574
Commit
6aa47574
authored
2 years ago
by
Ehret
Browse files
Options
Downloads
Patches
Plain Diff
update right hand, so interaction component is attaches to the mouse
parent
3a08aadd
No related branches found
No related tags found
3 merge requests
!22
Get changes and fixes from 4.26 into 5 as well
,
!16
update 4.27 branch to newest changes in 4.26
,
!15
Improve desktop test interaction
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp
+16
-0
16 additions, 0 deletions
Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp
Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h
+1
-0
1 addition, 0 deletions
Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h
with
17 additions
and
0 deletions
Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp
+
16
−
0
View file @
6aa47574
...
...
@@ -99,6 +99,18 @@ void AVirtualRealityPawn::SetCameraOffset() const
CameraComponent
->
SetWorldLocationAndRotation
(
Location
,
Rotation
);
}
void
AVirtualRealityPawn
::
UpdateRightHandForDesktopInteraction
()
{
APlayerController
*
PC
=
Cast
<
APlayerController
>
(
GetController
());
if
(
PC
)
{
FVector
MouseLocation
,
MouseDirection
;
PC
->
DeprojectMousePositionToWorld
(
MouseLocation
,
MouseDirection
);
FRotator
HandOrientation
=
MouseDirection
.
ToOrientationRotator
();
RightHand
->
SetWorldRotation
(
HandOrientation
);
}
}
void
AVirtualRealityPawn
::
OnForward_Implementation
(
float
Value
)
{
if
(
RightHand
)
...
...
@@ -130,6 +142,10 @@ void AVirtualRealityPawn::OnTurnRate_Implementation(float Rate)
{
AddControllerYawInput
(
Rate
*
BaseTurnRate
*
GetWorld
()
->
GetDeltaSeconds
()
*
CustomTimeDilation
);
}
if
(
UVirtualRealityUtilities
::
IsDesktopMode
())
{
UpdateRightHandForDesktopInteraction
();
}
}
void
AVirtualRealityPawn
::
OnLookUpRate_Implementation
(
float
Rate
)
...
...
This diff is collapsed.
Click to expand it.
Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h
+
1
−
0
View file @
6aa47574
...
...
@@ -55,4 +55,5 @@ protected:
bool
bApplyDesktopRotation
=
false
;
void
SetCameraOffset
()
const
;
void
UpdateRightHandForDesktopInteraction
();
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment