11-11-2022, 11:36 PM
I think of speed as pixels per frame something moves over the screen: speed = SQR(dx^2 + dy^2) if you want a formula
dx = speed * cos(HeadingInRadians)
dy = speed * sin(HeadingInRadians) ' more formulas
If fastest thing moves 5 pixels per frame then for 85% of it is .85 * 5 = 4.25 for speed and so on...
If the heading is up or down it's all dy.
Likewise if only left or right it's all dx.
dx = speed * cos(HeadingInRadians)
dy = speed * sin(HeadingInRadians) ' more formulas
If fastest thing moves 5 pixels per frame then for 85% of it is .85 * 5 = 4.25 for speed and so on...
If the heading is up or down it's all dy.
Likewise if only left or right it's all dx.
b = b + ...