# Tiby312

Member Since 29 Mar 2005
Offline Last Active Private

### In Topic: Speed Of Object In Specific Direction

30 January 2011 - 08:30 PM

Two years after I started this thread I have found the answer! LOL!

Pseudo code:
-First, calculate the acceleration (as a vector) you would normally apply to the vehicle.
-Copy the current velocity vector of the vehicle into a temp variable
-Add the acceleration vector you would normally apply to the temp velocity vector
-If the length (magnitude) of the velocity vector with the added acceleration is greater than the max speed (a scalar), set the length of the temp velocity vector to the max speed
-subtract the current velocity vector of the vehicle from the temp velocity vector that we just limited
-that difference is the acceleration you want to apply to the vehicle.

In this way you can limit the velocity of a vehicle without directly touching the velocity variable and by just apply acceleration to it. This is useful if you want to limit a vehicle's speed and still want explosions and collisions to send it flying all over the place.

### In Topic: Font To Sprite Script

27 January 2011 - 01:07 PM

Updated to work in GM8

### In Topic: AI Movement

09 September 2010 - 09:09 PM

I don't think it's that simple. I don't think you can to compare the boats speed to the distance to the target unless it were going straight at it (which is hardly ever, most of the time the tanks direction will be different from the direction to the target). I mean, the boat could be going fast enough to stop directly at the point, but it might be going in the wrong direction.

Here is a .gmk (game maker 8) of the problem and what I have tried so far.
via box.net

### In Topic: Tracking Down Songs In Resource Pack 2

10 February 2010 - 10:54 PM

I found this song that sounds like Firehawk. I dont know if it helps.

### In Topic: Movement Compensation - It Must Be Solved

04 January 2010 - 02:23 AM

Ooo yes that appears to work. I made a quick example: