I need someone good with physics to run through for me how to achieve, basically bullet code where the bullet can travel towards an object at a certain angle, and then bounce off that object, with a certain degree of deviation, %-wise.
One will need to calculate the normal (perpendicular) angle from the surface of reflection.
Then, the angle of reflection of the bullet will be the same angle it came in at from the normal.

EDIT:

The deviation will come from a percent of error, such as a 1% deviation: the angle reflected x 0.01
How would one calculate that? The reflection angle? Is there an algorithm? Or is it just same velocity, reverse direction, account for error?
It is exactly that, just the same velocity, reverse direction, and then create a random number/percent to deviate. Remember, the angle is flipped over the normal.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement