View Single Post
Old 07 January 2013, 16:33   #53
Registered User
Join Date: Jan 2012
Location: USA
Posts: 281
Originally Posted by Mrs Beanbag View Post

Given that you can narrow the problem down to a collision between two objects. Suppose they are round objects. Both of them are moving. You have to calculate the position of both at the point at which they hit each other. Then you have to do some more vector arithmetic to calculate their new directions, after the collision.

For round objects that's actually quite easy, in theory. It involves a small bit of CPU bashing, involving multiplications. But if you want to calculate collisions between a round object and a rectangular object, that's a little trickier. If that rectangular object can be rotated at any angle, that's even tricker still.

Now, suppose we need to calculate the interactions of TWO rectangular objects, that are rotated at arbitrary angles, and also SPINNING at the same time. I'm going to write this in capital letters. THIS IS NOT A SIMPLE PROBLEM.

Read this and then tell me it is a simple problem:
And this just returns whether or not two rotated rectangles overlap - true or false - we've then got to go on to work out in exactly what way they push each other about.
All this makes me wonder if the blitter's collision detection feature would be useful.

Recall that if the result of a blit is all zeros then the flag BZERO remains set to 1.

First render one polygon to a plane. Then render a second to the same plane using D=A*C. No collision if the two polys don't intersect (BZERO remains 1).
mc6809e is offline  
Page generated in 0.06592 seconds with 9 queries