当前位置:网站首页>UE4 controls the rotation of objects by pressing keys
UE4 controls the rotation of objects by pressing keys
2022-07-26 04:30:00 【Zhichao_ ninety-seven】
Realization effect :

Implementation steps :
1. In the content browser , Right click the blueprint class , Create a file called The object rotates _BP The blueprint of , Double-click to open

2. Add the component -》 Cube

3. take Cube Drag in

4. Add local rotation , Set up z The value of is 2

5. increase event Tick ( It means that every frame is executed Local rotation )

At this time, the square can turn by itself

The next step is to be able to control the rotation of the square
6. Create a branch
7. Create a variable , Name it Can I rotate , Set the type of variable to Boolean

8. Hold down ctrl Drag the newly created variable into the event diagram ( Express get This variable ), And click the compile

9. establish Custom events , To control when the Boolean value is True or False

10 establish flip flop , It means to press once A, Press again to go B, In this cycle
11. Drag variables into the event diagram , choice Set up Can I rotate ,

12. A copy of , Here's the picture :

13. Can be flip flop Change to branch to judge whether the current Boolean value is right or wrong

14. Back to the third person blueprint , The new event chart is named control box rotation

15. establish keyboard 1; Create a variable named rotation object reference , Set the variable type to The object rotates _BP-> Object reference , In this way, the rotation of the object can be quoted _BP Variables in this blueprint

16. establish isValid

17. Pull the connecting line from the reference of the rotating object , Choose to create Control the rotation , Reconnect

18. Click the small eye marked , Click again compile 
19. Click the labeled straw icon , Then click... On the viewport interface The object rotates _BP ( It's the white square next to the villain )

↓

边栏推荐
- 解析Steam教育的课程设计测评体系
- Build a maker Education Laboratory for teenagers
- Throttling anti shake function of JS handwritten function
- 生活相关——一个华科研究生导师的肺腑之言(主要适用于理工科)
- 【学习笔记】AGC041
- I.MX6U-系统移植-6-uboot图形化配置
- 青少年创客教育的创意设计原理
- Yadi started to slow down after high-end
- YAPI安装
- Several methods of realizing high-low byte or high-low word exchange in TIA botu s7-1200
猜你喜欢

Design and implementation of smart campus applet based on cloud development

Which websites can I visit to check the latest medical literature?

支持代理直连Oracle数据库,JumpServer堡垒机v2.24.0发布

VM virtual machine has no un bridged host network adapter, unable to restore the default configuration

Several methods of realizing high-low byte or high-low word exchange in TIA botu s7-1200

idea插件离线安装(持续更新)

Getting started with mongodb Basics

青少年创客教育的创意设计原理

Steam科学教育赋予课堂教学的创造力

Dijango learning
随机推荐
Support proxy direct connection to Oracle database, jumpserver fortress v2.24.0 release
MySQL log classification: error log, binary log, query log, slow query log
1. Mx6u system migration-6-uboot graphical configuration
生活相关——减少期待,更快乐
3、 @requestmapping annotation
Which websites can I visit to check the latest medical literature?
五、域对象共享数据
1. If function of Excel
机器学习之信用卡欺诈检测
Swiftui one day crash
[C language foundation] 13 preprocessor
Network Security Learning - permission promotion 2
How does win11 22h2 skip networking and Microsoft account login?
支持代理直连Oracle数据库,JumpServer堡垒机v2.24.0发布
2022河南萌新联赛第(三)场:河南大学 B - 逆序对计数
Comparison of the relationship between the number of partitions and the number of reducetask in MapReduce
Threadpooltaskexecutor and ThreadPoolExecutor
Why is mongodb fast
qt编译报错整理及Remote模块下载
Wu Enda's machine learning after class exercises - logical regression