Vector applied in Circular Motion

Started by
15 comments, last by ADT_Clone 14 years, 10 months ago
Okay, I read over it. I sort of get it, although I want to apply this into a gaming context. How would this work?
Advertisement
Bump
What are you trying to model in your game?
My $0.02
//Integrate the body with any kind of crazy impulse you want,// then call this funcion. It's sloppy but it'll get the job done.void ConstrainBodyToAxis(Body &body, const PointDirection &axis, float radius){  Vector localP = body.P - axis.P;  Vector biPerp = Cross(localP, axis.D);  Vector perp = Cross(biPerp, axis.D);  perp.SetMagnitude(radius);  body.P = axis.P + perp;}


You'd have to update the other variables too. V and W. They're just vectors too.

Google says:
http://wiki.vdrift.net/Numerical_Integration#Newton-Stormer-Verlet_.28NSV.29_.2F_Symplectic_Euler_.2F_Euler.E2.80.93Cromer_algorithm
Sorry, but I still don't get all of this. What do I actually have to do to constraint an object to a constant ciruclar path where movement is contributed by a variable force on the object of any magnitude or direction.
Quote:Original post by ADT_Clone
Sorry, but I still don't get all of this. What do I actually have to do to constraint an object to a constant ciruclar path where movement is contributed by a variable force on the object of any magnitude or direction.

Read Advanced Character Physics and use Verlet integration to apply the forces. Create a physical constraint on the object such that it is always a distance of R away from the axis of which it is to rotate about, and if you're working in 3D force one of its components to always be zero (so that it constrains it to a 2D plane). This is the simplest solution and should give you good results.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]
Thanks a lot. I'll have a read through it, seems like what I'm looking for.

This topic is closed to new replies.

Advertisement