Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RWTH VR Demo Plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Monitor
Incidents
Service Desk
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 Demo Plugin
Commits
08ffc1aa
Commit
08ffc1aa
authored
1 month ago
by
Kris Tabea Helwig
Browse files
Options
Downloads
Patches
Plain Diff
refactoring of CameraRideSecondsToUpdates; Documentation updates
parent
6f0f32a4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/RWTHVRQuickStart/Private/PointOfInterestManager.cpp
+3
-3
3 additions, 3 deletions
Source/RWTHVRQuickStart/Private/PointOfInterestManager.cpp
Source/RWTHVRQuickStart/Public/PointOfInterestManager.h
+6
-3
6 additions, 3 deletions
Source/RWTHVRQuickStart/Public/PointOfInterestManager.h
with
9 additions
and
6 deletions
Source/RWTHVRQuickStart/Private/PointOfInterestManager.cpp
+
3
−
3
View file @
08ffc1aa
...
@@ -40,7 +40,7 @@ void APointOfInterestManager::ResetToPlayerStart()
...
@@ -40,7 +40,7 @@ void APointOfInterestManager::ResetToPlayerStart()
UGameplayStatics
::
GetAllActorsOfClass
(
GetWorld
(),
APlayerStart
::
StaticClass
(),
AllPlayerStarts
);
UGameplayStatics
::
GetAllActorsOfClass
(
GetWorld
(),
APlayerStart
::
StaticClass
(),
AllPlayerStarts
);
if
(
AllPlayerStarts
.
IsEmpty
())
if
(
AllPlayerStarts
.
IsEmpty
())
{
{
UE_LOGFMT
(
POIManagerLog
,
Warning
,
"Attempted to move player pawn to PlayerStart but no PlayerStart found to move."
);
UE_LOGFMT
(
POIManagerLog
,
Warning
,
"Attempted to move player pawn to PlayerStart but no PlayerStart found to move
to
."
);
return
;
return
;
}
}
AActor
*
PlayerStart
=
AllPlayerStarts
[
0
];
AActor
*
PlayerStart
=
AllPlayerStarts
[
0
];
...
@@ -121,7 +121,7 @@ void APointOfInterestManager::StartCameraRide()
...
@@ -121,7 +121,7 @@ void APointOfInterestManager::StartCameraRide()
CameraRideStart
=
UGameplayStatics
::
GetTimeSeconds
(
this
);
CameraRideStart
=
UGameplayStatics
::
GetTimeSeconds
(
this
);
CameraRideEnd
=
CameraRideStart
+
SplineComponent
->
Duration
;
CameraRideEnd
=
CameraRideStart
+
SplineComponent
->
Duration
;
CurrentUpdate
=
0
;
CurrentUpdate
=
0
;
DurationInUpdates
=
static_cast
<
int
>
(
SplineComponent
->
Duration
*
CameraRide
SecondsToUpdates
);
DurationInUpdates
=
static_cast
<
int
>
(
SplineComponent
->
Duration
*
CameraRide
TicksToDistancePerSecond
);
IsRidingCamera
=
true
;
IsRidingCamera
=
true
;
}
}
...
@@ -196,7 +196,7 @@ void APointOfInterestManager::ProgressCameraRide()
...
@@ -196,7 +196,7 @@ void APointOfInterestManager::ProgressCameraRide()
{
{
if
(
CurrentUpdate
<
DurationInUpdates
)
if
(
CurrentUpdate
<
DurationInUpdates
)
{
{
float
CurrentTime
=
1.0f
*
CurrentUpdate
/
CameraRide
SecondsToUpdates
;
float
CurrentTime
=
1.0f
*
CurrentUpdate
/
CameraRide
TicksToDistancePerSecond
;
FVector
Location
=
SplineComponent
->
GetLocationAtTime
(
CurrentTime
,
ESplineCoordinateSpace
::
World
);
FVector
Location
=
SplineComponent
->
GetLocationAtTime
(
CurrentTime
,
ESplineCoordinateSpace
::
World
);
FRotator
Rotation
=
SplineComponent
->
GetRotationAtTime
(
CurrentTime
,
ESplineCoordinateSpace
::
World
);
FRotator
Rotation
=
SplineComponent
->
GetRotationAtTime
(
CurrentTime
,
ESplineCoordinateSpace
::
World
);
Rotation
.
Pitch
=
0
;
Rotation
.
Pitch
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Source/RWTHVRQuickStart/Public/PointOfInterestManager.h
+
6
−
3
View file @
08ffc1aa
...
@@ -54,11 +54,14 @@ public:
...
@@ -54,11 +54,14 @@ public:
/**
/**
* Only relevant when MakeCameraRideProgressionConstantBetweenTicks = true.
* Only relevant when MakeCameraRideProgressionConstantBetweenTicks = true.
* The conversion rate of how many ticks the camera should update to equal the distance traveled during 1 second.
* This value is the amount of ticks required to cover the distance which the camera would travel per second with the default
* USplineComponent values.
* Higher number = slower camera speed
* Lower number = higher camera speed
*/
*/
UPROPERTY
(
EditAnywhere
,
Category
=
"Point Of Interest Manager"
,
UPROPERTY
(
EditAnywhere
,
Category
=
"Point Of Interest Manager"
,
meta
=
(
EditCondition
=
"MakeCameraRideProgressionConstantBetweenTicks"
))
meta
=
(
EditCondition
=
"MakeCameraRideProgressionConstantBetweenTicks"
))
int
CameraRide
SecondsToUpdates
=
60
;
int
CameraRide
TicksToDistancePerSecond
=
60
;
protected:
protected:
UPROPERTY
(
EditAnywhere
)
UPROPERTY
(
EditAnywhere
)
...
...
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