| Miles Sound System SDK 7.2a |
The function AIL_set_sample_3D_velocity_vector sets the current velocity of a 3D sample.
void AIL_set_sample_3D_velocity_vector( HSAMPLE S, F32 dX_per_ms, F32 dY_per_ms, F32 dZ_per_ms ); |
The velocity of a 3D object is used for calculating the Doppler pitch shift, as well as the amount to move the object when Miles repositions the object with AIL_update_sample_3D_position.
Note that since the distances for velocity are in meters per millisecond, the values passed to this function are generally very small. For example, at 20 miles an hour (about the fastest a human can run), you would be passing in roughly 0.009 for a non-normalized delta value.
Following DirectSound3D's somewhat-awkward lead, Miles uses the left-handed coordinate system. All of DirectX also uses left-handed coordinates, so passing in coordinates from a DirectX application is simple. OpenGL, on the other hand, cleanly uses right-handed coordinates, so you must invert the sign of the Z parameter before passing it into Miles.
Group:
Digital Audio Services
Related Functions:
AIL_sample_3D_velocity, AIL_set_sample_3D_orientation, AIL_set_sample_3D_position, AIL_set_sample_3D_velocity, AIL_update_sample_3D_position
Related Basic Types:
F32, HSAMPLE, void
Related FAQs:
What's the best way to port my older Miles application to MSS 7?
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.