AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkSprite.SetPhysicsVelocity Method (Single, Single)

Immediately sets the sprite's velocity to the given direction.

Syntax
Pascal
procedure SetPhysicsVelocity(const VX: Single; const VY: Single); overload;
Parameters 
Description 
const VX: Single 
The X component of the new velocity. 
const VY: Single 
The Y component of the new velocity. 

This is an abrupt change that might not look right during the physics simulation, forces and impulses are the preferred approach to influencing velocity.

Copyright (c) 2012. All rights reserved.