Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Virtual Acoustics 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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Virtual Acoustics Plugin
Commits
513886b8
Commit
513886b8
authored
Nov 26, 2021
by
Ehret
Browse files
Options
Downloads
Patches
Plain Diff
check for bones if multipe skeletalactors exist
parent
82c7bbf3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp
+9
-8
9 additions, 8 deletions
...APlugin/Private/SoundSource/VAAbstractSourceComponent.cpp
with
9 additions
and
8 deletions
Source/VAPlugin/Private/SoundSource/VAAbstractSourceComponent.cpp
+
9
−
8
View file @
513886b8
...
@@ -127,18 +127,19 @@ void UVAAbstractSourceComponent::Initialize()
...
@@ -127,18 +127,19 @@ void UVAAbstractSourceComponent::Initialize()
UpdateRate
=
ReceiverActorTmp
->
GetUpdateRate
();
UpdateRate
=
ReceiverActorTmp
->
GetUpdateRate
();
SkeletalMeshComponent
=
dynamic_cast
<
USkeletalMeshComponent
*>
(
GetOwner
()
->
GetComponentByClass
(
USkeletalMeshComponent
::
StaticClass
()));
if
(
MovementSetting
==
EMovement
::
AttachToBone
)
if
(
MovementSetting
==
EMovement
::
AttachToBone
)
{
{
if
(
SkeletalMeshComponent
!=
nullptr
TArray
<
UActorComponent
*>
MeshComponents
=
GetOwner
()
->
GetComponentsByClass
(
U
SkeletalMeshComponent
::
StaticClass
());
&&
SkeletalMeshComponent
->
DoesSocketExist
(
FName
(
*
BoneName
))
)
for
(
UActorComponent
*
Component
:
MeshComponents
)
{
{
FVAUtils
::
LogStuff
(
"[UVASourceComponent::Initialize()]: Bone "
+
BoneName
+
" detected."
,
false
);
USkeletalMeshComponent
*
MeshComp
=
Cast
<
USkeletalMeshComponent
>
(
Component
);
if
(
MeshComp
&&
MeshComp
->
DoesSocketExist
(
FName
(
*
BoneName
)))
{
//found the right mesh component
SkeletalMeshComponent
=
MeshComp
;
}
}
}
else
if
(
SkeletalMeshComponent
==
nullptr
)
{
{
FVAUtils
::
OpenMessageBox
(
"[UVASourceComponent::Initialize()]: Could not find bone "
+
FVAUtils
::
OpenMessageBox
(
"[UVASourceComponent::Initialize()]: Could not find bone "
+
BoneName
+
", using MoveWithObject instead."
,
true
);
BoneName
+
", using MoveWithObject instead."
,
true
);
...
...
...
...
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
sign in
to comment