Aw mover rider add
Minimum requirements | ||
---|---|---|
Added in version 4.1 | ||
SDK | build 53 |
int aw_mover_rider_add (int id, int session, int dist, int angle, int y_delta, int yaw_delta, int pitch_delta)
Description
Adds a rider to a mover.
Callback
None (returns immediately)
Notes
If the method was succesful then it will trigger an AW_EVENT_ENTITY_RIDER_ADD.
Argument
- id
- Mover ID. Reference to AW_ENTITY_ID.
- session
- Session number of the rider.
- dist
- Distance in the XZ plane from the origo of the mover object to the rider.
- angle
- Angle in the XZ plane between the Z axis of the mover object and the rider.
- y_delta
- Distance along the Y axis from the origo of the mover to the Y coordinate of the rider.
- yaw_delta
- Yaw of the rider, relative to the yaw of the mover object.
- pitch_delta
- 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.
Argument attributes
None
Return values
- RC_SUCCESS
- RC_NOT_INITIALIZED
- RC_NO_INSTANCE
- RC_NO_CONNECTION
- The connection to the world is down.
- RC_UNAUTHORIZED
- Only instances owned by a caretaker (i.e. aw_bool (AW_WORLD_CARETAKER_CAPABILITY) returns 1) may use this method.
Returned attributes
None
Usage
See Movers for an example how to change states and thereby control a mover.