x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Laser beam for motion controller bugged 50% of the time.

I m having a really obscure issue. I set up a system to have a laser beam coming out of my motion controller vive by pressing the right trigger. When I lanched the Vr preview the laser would work approximately 50% of the time. I attached a point light where the laser collide with an object. The point light is always working and visible when I press the trigger. The code behind the laser (which trigger an action on different actor blueprint) is always working, but the visual laser works randomly. I lanch the editor and it will work, then launch it again and won't work. Sometimes after pressing it 10times it will work and sometimes after trying to press 100 times it will still not work. This is unlogical to me. I don't know if someone went through this kind of issue already.

Thanks in advance. alt text

[Edit: We found the solution for the issue, was due to the variable booleen. But I have still an issue of the beam being laggy, there is a delay when I move the controllers, the beam follow it up with a small delay, any clue from where it could come? Maybe due to the event tick? ]

Product Version: UE 4.14
Tags:
beam.png (208.0 kB)
more ▼

asked Mar 04 '17 at 11:54 AM in VR

avatar image

Bry55
18 6 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi Bry55,

I have experienced similar issues with 3D Widget Interaction.
Im not sure why, but for me it seemed like to be performance related. What FPS do you have?

you could try to hook only the beam up to the Event Tick after the Branch, using the Vive Right hand mesh data, just to see if it works like that.

more ▼

answered Mar 04 '17 at 12:42 PM

avatar image

kornel.l.varga
71 5 13 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

What happens if you set the visibility of the beam from the "Enable Beam Right Hand" value? Does the beam show up every time or still the same issue?

more ▼

answered Mar 04 '17 at 12:46 PM

avatar image

Black Phoenyx
4.1k 165 9 170

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

So I set up the variable Enable Beam Right Hand "true" and then added the point light visibility to the event "Press Trigger" (so it doesn't show it continually at the beginning of the game) and it's working now every time. Cheers mate!! But I still don't understand why having this variable "false" at the beginning and then making it true when the trigger is press was randomly showing the laser or not. So so weird. Do you have a clue? But thanks for the tip, helped me a lot!! alt text

solution.png (250.6 kB)
more ▼

answered Mar 04 '17 at 02:02 PM

avatar image

Bry55
18 6 4 7

avatar image Black Phoenyx Mar 04 '17 at 02:10 PM

The way you were setting the bool value for the set visibility was the problem, if you want to set it a little better don't set it from the trace return value but instead manually basically the same way you set the "Enable Beam Right Hand" value.

avatar image Bry55 Mar 04 '17 at 03:25 PM

Ok, thank you very much mate! I will change it :)

avatar image Black Phoenyx Mar 04 '17 at 03:38 PM

Don't forget to mark this as resolved/answered.

avatar image Bry55 Mar 05 '17 at 08:53 AM

Yeah I have a last question about these beam, there are lagging. When I move the controllers there is a kind of delay on how they are following them. Do you have any clue about this? I thought that it could be the fact that on event tick and then pretty expensive, but I tried another scene of someone having them on event tick as well and he didn't get this "delay"..?

avatar image Black Phoenyx Mar 06 '17 at 02:59 PM

Sorry I missed this comment, what do you mean laggy? like it stays where it was and needs to catch up to the movement...like a time delay in the movement? How is it attached to your controllers? are you setting a target and source for the particle or it just a simple beam?

avatar image Bry55 Mar 07 '17 at 08:32 AM

No worries :) yeah exactly like that, it needs to catch up on its movement. I created a beam which is just a child of the controller. But it has a source in the linetrace. Do you thing it can be the issue? Or can it come from the event tick? I took also a screenshot of how the material is set up. Is it maybe too expansive material for the beam? alt text alt text

beam3.png (61.9 kB)
capture4.png (295.1 kB)
avatar image Black Phoenyx Mar 07 '17 at 12:14 PM

No, the beam material looks fine it will be in the particle itself and how you attach it that will cause the lag....I think I see the issue actually, instead of constantly setting the beams source point on tick set it once manually that way it is always starting from the mesh's location. Something else you could try experimenting with is instead of using source and target create a parameter in the particle to set the length and simply update the length of the beam. Doing that the beam will always face the same direction (whatever direction the mesh is facing) and just update its length.

avatar image Bry55 Mar 08 '17 at 04:35 PM

Ok I will try some stuff tomorrow and let you know. Thanks a lot mate!!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question