Small problem with Ball physics code...

Blitz3D Forums/Blitz3D Programming/Small problem with Ball physics code...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well I think I know why it is doing it. You are tforming a vector from the entity to the world. All well and good but you are also aligning this entity to the normals of the collision with another ball. The two combined are causing the problem.

Now I am not sure you need that aligntovector at all, and as for the ball control impulses I would apply them based on the camera yaw, which may be more useful. (Tform from a pivot which just yaws the camera).

Something else to bear in mind with colliding balls is that you can from memory get anywhere from 1 to 3 collisions per impact. (There is some code posted somewhere that demonstrates this - here it is http://www.blitzbasic.co.nz/Community/posts.php?topic=27138 ). You might want to account for this, but at the end of the day as long as the thing behaves as you want I would not worry too much.