godot-start/doc/demo06_move/move.md

31 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-06-19 03:47:35 +00:00
# 1. 向量的基础
![Image text](image/vector01.JPG)
![Image text](image/vector02.JPG)
![Image text](image/vector03.JPG)
![Image text](image/vector04.JPG)
![Image text](image/vector05.JPG)
![Image text](image/vector06.JPG)
![Image text](image/vector07.JPG)
![Image text](image/vector08.JPG)
2022-06-19 04:40:01 +00:00
- a·b=||a||||b||cosθ, 这个是向量的内积,又叫数量积,又叫点积。
- axb = ||a||||b||sinθ这个是向量的外积又叫向量积又叫叉积。
![Image text](image/vector11.png)
2022-06-19 03:47:35 +00:00
![Image text](image/vector09.JPG)
![Image text](image/vector10.JPG)
2022-06-25 06:10:18 +00:00
- 常量以godot游戏引擎为准Vector是我从unity文档复制过来的
2022-06-19 04:04:56 +00:00
# 2. 通过输入事件来控制物体移动
2022-06-19 04:07:26 +00:00
- 事件系统是游戏开发过程中需要涉及到交互常用的功能。
- 使用事件系统不仅可以将输入行为(例如:键盘、鼠标、触摸)以事件的形式发送到应用程序
- 也可以将游戏过程中的发生的,需要其他对象关注的事情通过事件的形式回应。例如:游戏胜利后需要打开结算或者奖励界面。
2022-06-19 04:08:03 +00:00
![Image text](image/move1.png)
![Image text](image/move2.png)
![Image text](image/move3.png)