Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I get the impact angle of a ray?

I'm making a gun script, and I want to add a realistic-ish ricochet, where if the impact angle is under a certain number, it will bounce off. The part I'm having trouble with is finding the impact angle.

I know that I have the hitnormal of the ray, but after playing around with that I couldn't find any correlation between that and the impact angle of the bullet. (I couldn't find anything on the internet either.)

Just a note: My gun uses tons of rays to simulate an arc, so the rays are pretty small.

2 comments

0

epic

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.