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
GitLab 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
14f2f1f4
Commit
14f2f1f4
authored
Nov 7, 2023
by
Daniel Rupp
Browse files
Options
Downloads
Patches
Plain Diff
doc(movement): adds some comments
parent
612e8e2d
No related branches found
No related tags found
1 merge request
!43
refactor(movement): extracts turning logic from MovementCommponentBase to own Component
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp
+1
-2
1 addition, 2 deletions
...e/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp
Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h
+12
-4
12 additions, 4 deletions
Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h
with
13 additions
and
6 deletions
Source/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp
+
1
−
2
View file @
14f2f1f4
...
...
@@ -66,6 +66,7 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
}
}
// A separate button has to be pressed, for when mouse movement should contribute to turning
void
UTurnComponent
::
StartDesktopRotation
()
{
bApplyDesktopRotation
=
true
;
...
...
@@ -138,6 +139,4 @@ void UTurnComponent::RotateCameraAndPawn(float Yaw) const
VRPawn
->
Controller
->
SetControlRotation
(
NewRotation
);
VRPawn
->
SetActorLocationAndRotation
(
NewLocation
,
NewRotation
);
//FVector MovedBy = NewLocation - OrigLocation;
}
This diff is collapsed.
Click to expand it.
Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h
+
12
−
4
View file @
14f2f1f4
...
...
@@ -45,18 +45,26 @@ public:
UPROPERTY
(
EditDefaultsOnly
,
BlueprintReadOnly
,
Category
=
"VR Movement|Input"
)
class
UInputMappingContext
*
IMCMovement_Right
;
/**Input Mapping Context that maps buttons for desktop mode*/
UPROPERTY
(
EditDefaultsOnly
,
BlueprintReadOnly
,
Category
=
"VR Movement|Input"
)
class
UInputMappingContext
*
IMCDesktopRotation
;
/*Movement Input*/
/**
* Called every tick as long as stick input is received to allow for continuous turning
* @param Value Stick input value determines turn direction and turn speed
*/
UFUNCTION
(
BlueprintCallable
)
void
OnBeginTurn
(
const
FInputActionValue
&
Value
);
/**
* Called once if stick input is received to rotate player at constant value
* @param Value Stick input value determines turn direction
*/
UFUNCTION
(
BlueprintCallable
)
void
OnBeginSnapTurn
(
const
FInputActionValue
&
Value
);
/*Desktop Testing*/
//
the idea is that you
ha
ve
to
hold the right mouse button to do rotations
//
A separate button
ha
s
to
be pressed, for when mouse movement should contribute to turning
UFUNCTION
()
void
StartDesktopRotation
();
...
...
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