# SetSpritePhysicsVelocity

## Description

Immediately sets the sprite's velocity to the given direction. This is an abrupt change that might not look right during the physics simulation, forces and impulses are the preferred approach to influencing velocity.

## Definition

SetSpritePhysicsVelocity( iSpriteIndex, vx, vy )

void agk::SetSpritePhysicsVelocity( UINT iSpriteIndex, float vx, float vy )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- vx - The x component of the new velocity.
- vy - The y component of the new velocity.