|
-
Apr 19th, 2001, 10:31 PM
#4
How many axes are in your 2D project?
You've been insisting that this is 2D, and you even mentioned X and Y. Now I'm seeing Z.
Also, velocity is a change in position with respect to time. Unless you have timed the updates of redrawing, your "myVelocity" may be scaled badly (hence zooming off of the screen).
Your formula should give you an angle between 0 and 90 degrees. Is that what you are expecting (Quadrant I)? I haven't dabbled in VB for a while, but a popular function handles all quadrants. I'm assuming it's available in VB (atan2, atn2, ArcTangent2)? You would have to check the signs to determine the correct quadrant if you don't have an atan2 function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|