[ODE] About modifying some properties by hand (newbie question)
Megan Fox
shalinor at circustent.us
Fri Jul 9 09:00:52 MST 2004
Why not GetVelocity(), compare it to your desired velocity, and apply an impulse that will result in your desired velocity that frame? (and do this every frame where the user has "forward" pressed, or whatever)
-Megan
> I've read several messages about how it is not possible to set
> the position of an object by hand. That would've been very useful
> when i try to transform user input into the ODE physic world.
>
> However, can i modify the velocity by hand, while still
> maintaining the physical integrity? Or do i always have to apply forces?
>
> If i can directly modify the velocity, then, knowing the
> timestep, and the distance to the position i want the object to be then:
> -I could modify the velocity so that the object will be in the
> desired position in the next step.
> -Let ODE calculate one step.
> -Now i the object should be in the desired position. I set
> velocity to zero.
> I suppose i should modify the velocity after having set the
> acceleration to 0.
>
> Would that work? If so, is there something special to the way ODE
> applies to the velocity in order to calculate the new position,
> or will the traditional...
> p2 = p1 + v (t2 - t1)
> [p->position, v->velocity, t->time]
> ...formula work?
>
> Thanks for the help.
>
> --
> Saludos,
> STenyaK
>
> -----------------------------------
> MAIL= stenyak@@@gmx...net
> ICQ#= 153709484
> SITE= http://kwh.iespana.es
> Motorsport - For Simracers, by Simracers - http://motorsport-sim.org
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
More information about the ODE
mailing list