I’ve been asked to do some research over the past week in Ue4 for Archviz. I’ve been focusing on Lightmaps and getting those right.
Now i’m moving on to some interactivity aspects with regards to Arch viz, interiors, such as using keyboard control to switch lights on at a light switch location.
As i’m new to visual scripting and C++ i’ve stumbled across a problem with how my script works.
I’ve followed this post to create my switch, but it doesn’t execute, turning the light on and off. I was wondering what i am missing. If anyone can help or point me in the right direction that would be great.
Original post i followed, i have used AceD’s method as i think this is what i am after.
I want to walk up to the light switch, when in close proximity, i want it to show the letter E, then when i press E on the keyboard i want the light to turn on, Then press E again and it will turn off. When i move away from the proximity of the switch the E will disappear.
Here’s some information of what i have set up so far and for the purpose of simulation i walk to the light switch and press E and this is how far it goes it cast fails.
Location in scene
Lightswitch blueprint setup Name: LightbuttonBP
Spotlight Blueprint Setup Name:Pointlight2
Script for pointlight2
Script for LightbuttonBP
Simulation of where it gets up to