Greetings,
I’ve been looking online, and the tutorials I’ve found are very unfocused and/or sloppy. Can anyone either point me to a good video or explain how to make a laser not go through solid surfaces?
Greetings,
I’ve been looking online, and the tutorials I’ve found are very unfocused and/or sloppy. Can anyone either point me to a good video or explain how to make a laser not go through solid surfaces?
Man, I’m having little luck in the forums lately.
(bump)
Hey @Leomerya12!
Can you explain what you mean by a “laser”?
Typically what one will do (Provided you’re talking about some sort of Laser gun etc) is use a Line Trace by Channel to get a surface, and set that to the endpoint of a texture or even a cylinder of some kind, with the end of the barrel as the start point.
To get it to not go through static surfaces, you’ll set the trace to “Visible”, break the Hit Out, and use “Get Hit location” and have your laser stop at that spot
Thank you! A response.
I mean, the type of laser you would see from an an enemy. A damaging laser that hits you and plays a collision/overlap particle effect.
Like what these guys do:
So yeah, what I said above would be perfect for this, with the line trace, you set “Point B” with “PointA” as your muzzle (Use SceneComponents for this) and draw your laser material from point A to point B. Not really “From” since lasers are instant, it’s more like an “Appear stretched from here to here”.
Then using that “Point B” you can spawn a decal of burns or something on location, splatting it on the wall!
Got it. The issue I’m facing is that I’m using an asset from the marketplace that has a fixed length (the maker said so themselves). I’m going to try to use the Niagara System like a static mesh with your help, math, and prayer.
A lot of the items from the Marketplace seem to be made for the creators not the actual people who buy them.
Actually yeah, just use a Niagara system, I don’t know why I said texture. I mean Niagara is a bunch of textures with more activity, I guess. But here’s a tutorial I recommend pretty often that’ll have you ending up with a good laser, and possibly enough knowledge to customize it a bit!
Disclaimer: This link is not affiliated with Epic Games, Unreal Engine, or their partners.
Just wanted to show you (with some math) that I got it working.
Thanks, again!