Making an object bounce off a surface?

I’m making a thrown weapon for a game. It is almost working in its most basic viable form, but one crucial functionality it is missing is the ability to bounce off of a surface.

The projectile moves using BodyMovers at high speed, and I need it to be able to hit a surface and bounce back off it without losing momentum at a realistic angle. Ideally, it also wouldn’t bounce off players, but go through them. I already have the weapon going through players, but I can’t figure out how to bounce off surfaces.

The weapon does not have to bounce off all surfaces - if it can bounce only off of one kind of surface, that would also be acceptable.

What solutions are there to this problem? Are there any existing items with this bouncing behaviour that I can look at?

You might be able to use CustomPhysicalProperties to make it bounce around. Try setting the ElasticityWeight and Elasticity to high numbers and see what happens.

Unfortunately, this did not seem to work - I put both to their respective maximums and saw no difference in behaviour.

I’m not really sure then. There’s probably another way, but I don’t really know how.

If you know some calculus:

1 Like

I had a sinking feeling that something like this would be the only way. Guess I’m learning to do this today!

Nope, you can use raycast to reflect projectiles. Here: Roblox: Reflecting Rays. Want bullets to ricochet? Lasers to… | by Stephen | Medium