这是一篇入门教程,可以教会初学者怎样让一个Actor旋转。添加组件Component就不再详述
var float RotationSpeed; //旋转速度
event Tick(float DletaTime)
{
local float DeltaRotation; //每秒转动的速度
local Rotator newRotation;
DeltaRotation=DeltaTime*DeltaTime*DegToUnrRot; //DegToUnrRot虚幻常量,转换我们能理解的360周
newRotation=Rotation;
newRotation.Yaw+=DeltaRotation; //只让其平转
SetRotation(newRotation);
}
完