Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Virtual Acoustics Plugin
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
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
Virtual Acoustics Plugin
Commits
5bfb0ceb
Commit
5bfb0ceb
authored
1 year ago
by
Jonathan Ehret
Browse files
Options
Downloads
Patches
Plain Diff
Debug output cave tracking
parent
83e7b344
Branches
Branches containing commit
No related tags found
2 merge requests
!9
VAServerLauncher Improvement (now also sending reproduction type and ini)
,
!8
Debug output cave tracking
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/VAPlugin/Private/SoundSource/VASoundSource.cpp
+3
-2
3 additions, 2 deletions
Source/VAPlugin/Private/SoundSource/VASoundSource.cpp
Source/VAPlugin/Private/VAReceiverActor.cpp
+20
-5
20 additions, 5 deletions
Source/VAPlugin/Private/VAReceiverActor.cpp
with
23 additions
and
7 deletions
Source/VAPlugin/Private/SoundSource/VASoundSource.cpp
+
3
−
2
View file @
5bfb0ceb
...
...
@@ -8,6 +8,7 @@
#include
"SoundSource/VASoundSourceRepresentation.h"
#include
"Engine/World.h"
#include
"Utility/VirtualRealityUtilities.h"
// ****************************************************************** //
...
...
@@ -73,7 +74,7 @@ void FVASoundSource::SetPosition(const FVector NewPosition)
{
Position
=
NewPosition
;
if
(
!
FVAPlugin
::
SetSoundSourcePosition
(
SoundSourceID
,
Position
))
if
(
!
FVAPlugin
::
SetSoundSourcePosition
(
SoundSourceID
,
Position
)
&&
UVirtualRealityUtilities
::
IsMaster
()
)
{
FVAUtils
::
LogStuff
(
"[FVASoundSource::SetPosition()]:"
+
FString
(
" Could not set sound source position in VA. Position of visual and auditive representation might mismatch now."
),
true
);
...
...
@@ -86,7 +87,7 @@ void FVASoundSource::SetRotation(const FRotator NewRotation)
{
Rotation
=
NewRotation
;
if
(
!
FVAPlugin
::
SetSoundSourceRotation
(
SoundSourceID
,
Rotation
))
if
(
!
FVAPlugin
::
SetSoundSourceRotation
(
SoundSourceID
,
Rotation
)
&&
UVirtualRealityUtilities
::
IsMaster
()
)
{
FVAUtils
::
LogStuff
(
"[FVASoundSource::SetRotation()]:"
+
FString
(
" Could not set sound source rotation in VA. Orientation of visual and auditive representation might mismatch now."
),
true
);
...
...
This diff is collapsed.
Click to expand it.
Source/VAPlugin/Private/VAReceiverActor.cpp
+
20
−
5
View file @
5bfb0ceb
...
...
@@ -257,13 +257,28 @@ bool AVAReceiverActor::UpdateVirtualWorldPose()
if
(
TrackingSource
==
ETrackingSource
::
VirtualRealityPawn
)
{
// Auralization Pose is coppled to the Virtual Reality Pawn, e.g, HMD, CAVE
FVector
ViewPos
;
FRotator
ViewRot
;
GetWorld
()
->
GetFirstPlayerController
()
->
GetPlayerViewPoint
(
ViewPos
,
ViewRot
);
// Auralization Pose is coupled to the Virtual Reality Pawn, e.g, HMD, CAVE
AVirtualRealityPawn
*
VirtualRealityPawn
=
Cast
<
AVirtualRealityPawn
>
(
GetWorld
()
->
GetFirstPlayerController
()
->
AcknowledgedPawn
);
if
(
VirtualRealityPawn
==
nullptr
)
{
return
false
;
}
USceneComponent
*
Head
=
VirtualRealityPawn
->
Head
;
if
(
!
Head
)
{
return
false
;
}
FVector
ViewPos
=
Head
->
GetComponentLocation
();
FRotator
ViewRot
=
Head
->
GetComponentRotation
();
//Offset from ViewPoint (between eyes) to head center, rotate according to view rotation
ViewPos
+=
ViewRot
.
RotateVector
(
ViewpointToHeadcenterOffset
);
bool
bResult
=
true
;
bResult
&=
FVAPlugin
::
SetSoundReceiverPosition
(
ReceiverID
,
ViewPos
+
ViewRot
.
RotateVector
(
ViewpointToHeadcenterOffset
));
//Offset from ViewPoint (between eyes) to head center, rotate according to view rotation
bResult
&=
FVAPlugin
::
SetSoundReceiverPosition
(
ReceiverID
,
ViewPos
);
bResult
&=
FVAPlugin
::
SetSoundReceiverRotation
(
ReceiverID
,
ViewRot
);
return
bResult
;
}
...
...
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