GetVelocity returns a velocity.  It's already in degrees / second.
SetVelocity() takes the same units.  AngularImpulse is a vector type
that can contain an impulse, but here it's just used as a vector.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Justin Krenz
> Sent: Tuesday, July 25, 2006 9:02 PM
> To: [email protected]
> Subject: [hlcoders] Physics Problem
>
> I have a physics object that I'm trying to retrieve its
> angular velocity in degrees/second.  Using GetVelocity(Vector
> * velocity, AngularImpulse
> * angularVelocity), it appears that I can retrieve the
> angular impulse of the angular velocity.  Getting this value,
> I multiply it by 180*pi to convert from radian to degrees,
> and then I divide by the object's mass.
>
> However, I compare this to the actual change in degrees that
> the model undergoes, and the values are different.  For
> example, if I use
> SetVelocity(...) to input an AngularImpulse of 100 for the x
> axis/pitch every frame, then convert to radians and divide by
> a mass of 2080, I get approximately 2.8.  However, if I
> sample the actual change in degrees of the object's pitch
> every frame, it comes out to approximately 19 degrees/second.
>
> What am I doing wrong, and how can I correctly calculate an
> object's change in angle in degrees/sec?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to