Platz Function PlatzSetVelocity
Jump to navigation
Jump to search
Prototype |
|
---|---|
Description |
Sets the velocity of v to val and adjusts the trigger position in the case of a direction change. This last step ensures triggers fire when they are supposed to and do not re-fire despite the interaction between bounding box size changes and direction swapping. |
Parameters |
|
Returns |
Void |
Video Modes |
3 |
Since |
V0.3a |
Example 1: Increment the player's horizontal velocity.
platzActor a; PlatzSetVelocity(&a.vx, a.vx+1, &a.trLoc.x);
Example 2: Decrement the player's vertical velocity.
platzActor a; PlatzSetVelocity(&a.vy, a.vy-1, &a.trLoc.y);