Could you maybe provide us a video link, where the laserbeam feature in portal is shown? That might make it easier to understand, what you actually want to do. I might be able to help you further :). If you can, explain it in more detail. Then we might have more of a clue, what you exactly want to do :).
all of it is pprecited but what I want is how to create some kind of dynamic surface that the player want to walk on it an with a scale that transform when he hits a obstacle, like a walkable beam, its no the visual im interested in
What you want to do is use a linetrace from the origin until it hits something. From there, break the hit and get the Impact Location. Do Get Actor Location - Impact Location -> Vector Length to get the distance. Use this distance to scale the mesh in the X axis using proportions
Do you mind giving me extra help. I know you helped me greatly but I tried this solution and I guess I still dont exactly get it this is What I have so far
On the line trace, select Draw Debug Type dropdown and select “For Duration.” Now you can see the actual ray…is it hitting something and stopping? Or is it going thru geometry?
Another thing, Make sure the vector length is correct. I would still explicitly do Actor Location - Impact Point -> Vector length just to be safe.
Also, you want to resize the mesh by using dividing the distance by the mesh size (proportion).
Yup the trace work fine, it is red and become green when hit something, Your code is interesting but I am curious, what is the purpose of the spline in this context
Hmm, if the hit is correct then its probably something to do with the mesh scaling calculation. The code above is from my road builder tool. Im using a trace to get the distance from the track to the floor and scaling the “support.” You can see the tool working here:
Good to hear! Funny enough I just made something similar for my current project - a laser beam that resizes based on the hit location and was about to check in on you lol
To be honest I did something a little more simpler I think, I can show you the blueprint if you want, its something that might not fit all the need that being said because in my project, the laser is coming from a squre so it will always go in the same direction in the x,y axys