Aw mover rider add
|Added in version 4.1|
int aw_mover_rider_add (int id, int session, int dist, int angle, int y_delta, int yaw_delta, int pitch_delta)
Adds a rider to a mover.
None (returns immediately)
If the method was succesful then it will trigger an AW_EVENT_ENTITY_RIDER_ADD.
- Mover ID. Reference to AW_ENTITY_ID.
- Session number of the rider.
- Distance in the XZ plane from the origo of the mover object to the rider.
- Angle in the XZ plane between the Z axis of the mover object and the rider.
- Distance along the Y axis from the origo of the mover to the Y coordinate of the rider.
- Yaw of the rider, relative to the yaw of the mover object.
- Pitch of the rider, relative to the pitch of the mover object.
Distances are in centimeters. Angles are in tenths of a degree.
XZ plane (top view) z r | ___ / |/ a \/ | / | / | / | / |/ m---------x r = rider m = mover object a = angle between the vectors mz and mr a corresponds to the angle argument. distance between m and r corresponds to the dist argument.
XY plane (front view) y | b|-----r | / | / | / | / |/ m---------x r = rider m = mover object b = point with the y coordinate of the rider (in the local coordinate system of the mover object) and the x coordinate 0 distance between m and b corresponds to the y_delta argument.
Note that the x component of the vector mr is the same in both the XZ and the XY planes.
- The connection to the world is down.
- Only instances owned by a caretaker (i.e. aw_bool (AW_WORLD_CARETAKER_CAPABILITY) returns 1) may use this method.
See Movers for an example how to change states and thereby control a mover.