CodeBase - GDK> 2D top down 360 degrees Movement

Return to the CodeBase listing

Category: Functions

Version: 1.0

0
0

Information

Uploaded: 19th Aug 2008 07:23

Modified: 19th Aug 2008 07:39

Author:  Swift

Summary

Moves an object in the given direction with the given speed and then updates the objects x&y positions to reflect this movement

Full Description

/*<br /> <br /> FUNCTION: MoveDirSpeed( float direction, float speed, float *x, float *y );<br /> <br /> DESCRIPTION: Moves an object in the direction with speed and then<br /> updates the objects x&amp;y positions to reflect this movement<br /> <br /> direction - is the direction you want the object to move in (from 0-360) 0 is east 90 is north<br /> speed - is the speed you want the object to move at<br /> *x - is a pointer to the address of the objects x position<br /> *y - is a pointer to the address of the objects y position<br /> <br /> <br /> <br /> EXAMPLE: MoveDirSpeed( BallDirection, BallSpeed, &amp;Ball.x, &amp;Ball.y);<br /> <br /> MADE BY: Swift<br /> <br /> */<br />

Comments

No comments yet.