Steering Force and Acceleration Problem

Started by
2 comments, last by dodecahedron 19 years, 4 months ago
Hi guys, I don't know if this can be solved so easily but I'm hoping that a somewhat simple solution exists. I'm working in 2D and using constant acceleration. I'm trying to figure out what force (a steering force here) to apply so that the distance traveled (delta position) is the same regardless of the current velocity. So for example, lets say I have an object (particle) moving 100 units/sec and I apply a steering force the same magnitude as the velocity but at a 45 degree angle to it, the object will arc (circle), the more force I apply the smaller the circle will be. But if I do the exact same thing to an object moving faster it arcs a lot less. I realize this is because the relationship is not linear but I can't figure out how much force to apply so that the movement circles will be the same radius regardless of the object's speed. Also, I truncate the velocity to a maximum speed. A concrete example will show why I need to figure this out. Let's say I have an object heading North towards a wall, at about 50 units before the wall it can start turning and will be able to make a 90 degree turn without hitting the wall, if another object is doing the same thing but heading towards the wall at a much faster spped it shouldn't have to start turning at, say, 200 units before the wall, I want it to be able to start turning at 50 units distance just like the slower moving object. I hope I explained it properly. Please help. Thanks guys, Cyrus
Advertisement
Hi again,

I think I have it...does this look right:

x-x0 = 0.5(v0+v)t

after some rearranging I get:

(x-x0)/(0.5t) - v0 = v

then I solve for v and use v in:

a = (v-v0)/t

So if I have a current velocity (speed) and a desired displacement I can first compute the final velocity and then the acceleration required to get there.

Take care,
Cyrus

[edit]
It seems to work on paper but it doesn't work in my game. Any ideas ?
[end edit]


[Edited by - Endemoniada on December 16, 2004 1:51:52 PM]
I looked it up... the force required is F = mv2/r.

... and the force is applied at 90 degrees to the velocity, not 45 degrees.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
If you apply the force at 45 degrees, then the vehicle will speed up through the turn.

This topic is closed to new replies.

Advertisement