《UE4游戏开发》之 《常用的函数接口》

本文介绍在Unreal引擎中如何使用AActor类获取Actor的速度(单位:cm/s),以及利用UGameplayStatics类获取每帧的时间(秒),调整时间膨胀后的帧间隔时间。这些功能对于游戏开发中的物理模拟和动画控制至关重要。

一 、AActor
1. 获取Actor的速度

/** Returns velocity (in cm/s (Unreal Units/second) of the rootcomponent if it is either using physics or has an associated MovementComponent */
	UFUNCTION(BlueprintCallable, Category="Utilities|Transformation")
	virtual FVector GetVelocity() const;

二、UGameplayStatics
1. 获取每帧的时间

/** Returns the frame delta time in seconds, adjusted by time dilation. */
	UFUNCTION(BlueprintPure, Category = "Utilities|Time", meta = (WorldContext="WorldContextObject"))
	static float GetWorldDeltaSeconds(const UObject* WorldContextObject);
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值