Download

Trigger audio when player aims at object and presses key?

I’m trying to make my world pretty interactive by allowing the player to inspect an object without picking it up or zooming in and pressing a key to trigger audio. I’m a complete novice at blueprints. My greatest accomplishment in life so far is opening a door so…

Any help is greatly appreciated!

i just built a system that triggers health bar of an enemy to be visible if you are looking at it. You could do something similar.

Make a line trace at whatever distance you need, then if it hits an actor that you can inspect, use a blueprint interface that will handle the trigger. Put a branch that will stop if it’s the same actor if you need. Maybe add a timer or delay node to prevent rapid repeated inspection.

line trace By Channel https://www.youtube.com/watch?v=yo9VrxFgUJY

Blueprint Interface https://www.youtube.com/watch?v=G_hLUkm7v44

I can post a pic of my BP later if you want, I don’t have access to my project at the moment.

Please. That would be awesome.

Thank you so much for the help. I’ll follow up with results.