Individual sound playback of multiple audio components



Hello everyone. I wanted to make a realistic robot arm. You can see the outline of the robot in the image, and you can also see the problematic source.
As you can see in the video, the game starts with a huge sound.
When the game starts, the robot doesn’t move until it detects the character, so the motor sound shouldn’t be heard. The sound should be heard only when the character is detected and moved, but the motor sound is heard. After the character is detected, it works normally from then on.
However, this is actually not normal.
As you can see in the attached image, the play trigger works when the AngleDifference is less than 0.1, and the stop trigger works when it is more than 0.1.
However, if you look at the log part of the video, the AngleDifference increases by more than 0 when the robot moves. Isn’t it strange?
If it were normal, it would be “AngleDifference > 0.1”. However, if you do that, it doesn’t work. I don’t know why at all. The sound comes out even when the trigger doesn’t work, and the logic works in reverse. I thought this problem was caused by the fact that an actor component instance that detects rotation and controls sound is created for each joint, so I added logic to manage each instance as a separate thread using FRunnable, but the problem was not solved. Of course, it must be because of my poor programming skills. I hope someone can give me a clue to the solution. Tell me where to check.