Hello,
we have a set of blueprints that are activated with the LeftMouseButton using line trace by channel/break hit result. We are working with a First Person game mode, Archviz Character and default Player Controller.
We are using a Blueprint Interface, with a function ‘OnInteract’, that we have created inside the Interface. When the line trace hits a blueprint that has ‘OnInteract’ Event inside, it activates the Blueprint.
Line trace is working when we play the game in current viewport, but it does not when we play in standalone play (it does not activate the blueprints nor show the draw debug type line). Blueprints are all working correctly (we have changed the input from LMB to a key press just to check). Left Mouse Click is being detected (we have put a print string also to check if the game is receiving input). To check if our setup of the line trace or the Blueprint interface was the problem, we have changed the line trace input to a Key and a Print String as a result in case it hit anything, and it does not work in that way. We have a backup project in 4.9, we have tested it there, and it isn’t working there either.
The only thing that we think is not working at all is the line trace, and we have NO idea why (why it does work in viewport play but does not in stand alone play!)
We attach a screenshot of the Line Trace setup, and our World Settings. Please help!!!
Thanks in advance!
Hello Mikesira,
I don’t have a complete answer to your question, however I thought you should know that print text doesn’t work in standalone as it is a debug feature. Same probably goes for the draw debug line. You may need another way to signal that the line trace worked.
I wish I could help you further but I’m not an expert so you might want to wait until one of them sees your post and gives a good answer.
Good luck.
Hello Mikesira,
I don’t have a complete answer to your question, however I thought you should know that print text doesn’t work in standalone as it is a debug feature. Same probably goes for the draw debug line. You may need another way to signal that the line trace worked.
I wish I could help you further but I’m not an expert so you might want to wait until one of them sees your post and gives a good answer.
Good luck.
Hi Prof_enderboss, thanks for the quick reply and the help.
I kinda figure that the draw line from the linetrace would be for debugging only and would not show up.
As for the print string it did appear when we where testing if there was a problem with the inputs. We used a LeftMouseButton action to a print string in the Level Blueprint just to check if our inputs were registering correctly, so every time we would use an input it printed that to the screen.
So far we can’t figure what’s wrong, if the line trace by channel works in a stand alone play or in a final package exe, we must be doing something wrong… but what?!
Hello, just a quick update.
We manage to fix our problem. Apparently you can´t use the vector arrow in your character because it must be a camera to view the line trace. So we added a camera to the archviz character and now works fine.
Thanks, cheers!