Line trace based on reflection (bounce)
I have a shoot mechanic that launches a physics ball that can bounce on the level collision (it is basically the FPS template ball). In relation to this I want to create a preview of the bounce trajectory. The idea is to use the trace to let the player know what direction the ball will bounce, before he actually launches it.
Later I will switch out the trace with a mesh (my "preview line") and transform it using the values currently passed to the trace's end-input. Until then I have used the trace to get the basics right.
Obviously there will be an error margin as the trace/line will not care about the physics (velocity and shape). I'm planning to accomodate for the velocity by using the charge values as criterias for the trace length etc. I will add the trace/preview to a tick event once I see that it is acceptable.
As you see in the video: https://www.youtube.com/watch?v=pIM19IINkCA
it is not working correctly. It seems like trace #2 is being done from the mesh normal rather than the reflect vector. I guess my math is incorrect here.
My questions are:
Here is my blueprint.
asked Jan 18 '15 at 01:52 PM in Blueprint Scripting
This isn't based off of the projectile but instead it's based directly off of the player view. See if it gives you any ideas. The 'Mirror Vector by Normal' might do the trick.
answered Jan 21 '15 at 08:30 PM
TJ V ♦♦ STAFF
Hi! I am trying to do something similar but with lasers (reflected using prisms). How can I do this bounce logic x times, depending on the amount of prisms. Say if there is one prism then the beam should reflect once, but if there is a second after the reflected beam, I want it ti be REFLECTED of the normal once again. Can I use custom events and line trace start point as paramater input for this?
answered Mar 21 '18 at 04:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here