Scripting/Server/Classes/Object/RotateTo
Rotates the object to the given euler angles.
Syntax
object.RotateTo(rotation, speed)Arguments
- Vector rotation
- float speed
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "rotateto" )
{
local obj = CreateObject( 1362, player.Pos );
obj.RotateTo( Vector( 0.0, 0.0, 90.0 ), 5.0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Object
Categories: Server methods | Object