![]() Set up Ball object through external class Tigger Erase the ball by drawing the surface again Setup distance array for Circle obstacle collision GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) *įloat A = //point E on boundary of ball ![]() It calls an external class Tigger that does the calculations for dot product, normal, unit normal, etc. I understand the concept and believed that I had it implemented correctly, but the code does not work as intended, merely passes through the obstacles while continuing to correctly ricochet off the polygon’s inner walls. After much effort, I finally got it to work correctly and smoothly (figured out an error with how I used Double Buffering), but now I must manipulate my code so that it inclides 3 interior sphere (well, for my purposes, circles) obstacles upon which the ball must bounce upon. I’m currently taking an introduction to CG and have an assignment that involves a polygon corral (5 sided) in which a ball bounces. … well, moreso I don’t know where to go with my code for now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |