Difference between revisions of "CBlob::setVelocity"
From King Arthur's Gold Wiki
(Created page with "<onlyinclude> </onlyinclude> <syntaxhighlight lang="cpp"> void setVelocity( Vec2f vel ) </syntaxhighlight> Object method of: CBlob Category:Scripting [[Category...") |
|||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude> | ||
− | + | Sets a new velocity for the blob. | |
</onlyinclude> | </onlyinclude> | ||
+ | This function will set the new velocity for the blob. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | |||
void setVelocity( Vec2f vel ) | void setVelocity( Vec2f vel ) | ||
− | + | </syntaxhighlight> | |
+ | |||
+ | |||
+ | Example, which would stop physical movement of given blob: | ||
+ | <syntaxhighlight lang="cpp"> | ||
+ | this.setVelocity(Vec2f(0,0)); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 00:00, 29 September 2012
Sets a new velocity for the blob.
This function will set the new velocity for the blob.
void setVelocity( Vec2f vel )
Example, which would stop physical movement of given blob:
this.setVelocity(Vec2f(0,0));
Object method of: CBlob