CodeBase - Matrix Sliding Collision

Return to the CodeBase listing

Category: Collision

Version: 1.0

0
0

Information

Uploaded: 13th Jul 2006 13:15

Modified: 1st Jan 1970 01:00

Author:  Turtle Soup

Summary

This code shows how a matrix and a few variables can be used to produce a sliding collision effect with both static and moving objects

Full Description

This code is actually created from several codebase entries which i have merged together with the matrix heigh collision part of the &quot;ICED&quot; demo in DarkBASIC<br /> you control the camera<br /> the area that the ball (enemy) occupies is translated to co-ordinates on the matrix, which are then raised to 1000 in height<br /> the rest of the matrix is lowered to 0<br /> and everytime the ball moves the matrix is updated along with the 1000 high sections that the enemy occupies<br /> the ball also follows the camera to demonstate how the movement alters the matrix<br /> if the player moves the camera towards the ball the matrix will shift the camera out of the way, thereby giving an effect of the camera sliding out of the way of the enemy<br /> the high parts of the matrix do not have to be shown and can be hidden by updating the matrix before the co-ordinates are plotted<br /> <br /> I hope this comes in use<br /> =]

Comments

No comments yet.