Enable collision on Scene Component?
I´m making a interaction system, so when you look at the scene component "Intractable" I need it to send a event to the character etc. Basically my goal is:
When you look at a door knob, a npc, or anything intractable it popups a text saying the name of the interaction. And when you press space it interacts, very easy to do in all other engines, but I can´t understand how to do it in UE4. Thanks in advance :)
You will need to do a line trace with a blueprint interface. I would setup a distance limit so it does not pick things up too far away.
I use this when coming up to shops, so when the player is close enough and taps the screen, it finds which BP I have tapped on and runs scripting within that blueprint. i.e. opens a widget.
You could run this off event tick, so where ever the player is looking, it could check example 500 ahead and when hits a intractable object, a widget opens and you can run interaction of that.
Blueprint interfaces explained here: https://answers.unrealengine.com/questions/867537/check-for-nearest-target-and-move-it-it-on-button.html?childToView=867725#answer-867725
answered Jan 31 '19 at 10:10 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here