This is inside a looping timeline which add’s movement input to the actor. This all ends up being pretty buggy and doesn’t always working here is video showing how it currently is Sort of Working Reflection Vectors - YouTube as you can see in that video the direction doesn’t always update. So any suggestions on how I can improve this?
I’d do it with line traces. Do a trace to decide where it’s going to hit and then just lerp with a timeline ( or tick with vinterp ) from where you are to where you’re going.
The repeat the process.
It really depends how complicated it’s going to get. If there’s gonna be lots of objects hitting each other, there may be a better way…
Hey thanks for the help I just found a really simple solution for this. First thing I did was add a ProjectileMovement for easier movement. Next I made a c++ function that does this `float DotProduct = FVector::DotProduct(VectorToReflect, Normal);
return NewVector;` Every time a bullet hits a wall this is calculates it’s reflection. All I gotta do is input the hit normal and the velocity it’s traveling at example here
Hello, I’m sorry to reopen this topic.I followed your tutorial to operate, but in any case, the bullet only bounces back from the opposite direction of velocity rather than reflecting like light.Can you provide more detailed functions?