Download

Why do the simplest things elude me today? Bounce a ball off objects...

Okay, this is something REALLY simple, but I’m having the WORST time today figuring it out. Simply speaking, all I want to do is have a ball bouncing around at a constant velocity (not using built in physics).

I should just be able to get the hit normal, then mirror it by the hit normal, right? Wrong? obviously wrong… It’s just not working. I’ve looked for information on how do do this, but for some reason I’m just not coming up with ANY answers today… I’ve got an entire game that’s just ready for me to create other assets, and yet I can’t do a simple task like this? (this was supposed to be a small diversion just to take my mind off of the other game for a little while) … It’s definitely one of THEM days. If you’ve got a BP that does this, I’d really love a screenshot this morning as all the combinations that I’ve tried just are NOT working.

It’s like all the math juice has drained out of my head today.

Thanks!

How you want to get hit normal without physics? Raycast?

I was attempting to pull the normal from a hit event, but obviously not working.

Physics would have been great, but I can’t seem to set a constant velocity for the ball. If it’s hit in just the wrong way, it goes flying off at either an impossibly fast tangent–or extremely slow. (I had restitution to 1, friction to 0)

Well you can’t have it travel with constant velocity and use physics at the same time. PhysX is not build as a simulation engine and won’t preserve energy balance, energy can be added or removed at any collision. One thing is to try to use a sphere primitive - not a a custom collision sphere, it should behave better.
To do the same without physics you can try using movement swap and calculate forces manually.

Sry not swap but sweep - it’s an extra option of SetActorLocation node. I don’t know if you get collision normal with it but knowing at which location and with what collision occurred you can get collision point and normal by Ray cast. Try sweep option and see what you can get from it.

I managed to get what I wanted:

whatsmyvectorvictor.png

Thanks for your input, though! Really appreciate your quick responses!

That’s weird because Hit Normal is a normal of own object and hit impact normal is a normal of surface with which object had impact. The same for location, hit impact point is point of collision and hit location is where object where during collision. But if it works for you it great!

Actually, either one I use produces the same result. But if it’s something odd, then it’s GOING to happen to me. I’ve just become used to that over the years…