当前位置:网站首页>Judge the position of the monster in the role under unity3d
Judge the position of the monster in the role under unity3d
2022-07-05 04:54:00 【yaohuiyaoo】
1.AudioSource Used to obtain audio components
2.AudioClip Audio path
3.Resources.Load() Dynamically load audio
3.aduio.PlayOneShot(clip) Play the audio once
4.audio.play() Play the audio
5.Invoke(“ Method name ”, Time ) How many times will it be called
6.InvokeRepeating(“ Method name ”, Time , Time ) How often is it called , After a call , How many seconds does it take to call
7.Vector3.Dot( In front of the player , Enemy coordinates - Player coordinates );// Multiply two points
Be careful : After multiplication, the enemy is greater than zero in front of the player , Less than zero enemies are behind the player
8.Vector3.Cross( Enemy coordinates , Player coordinates )// Return to coordinates
notes :Vector3 pos=Vector3.Cross(enemy.position,transform.position)
pos.x=enemy.position.ytransfrom.positon.z-enemy.position.ztransfrom.positon.y;
pos.y=enemy.positon.xtransfrom.position.z-enemy.position.ztransfrom.positon.x;
pos.z=enemy.position.xtransfrom.position.y-enemy.position.ytransfrom.position.x;
If pos.y Less than 0, The enemy is on the left of the player
边栏推荐
- 669. Prune binary search tree ●●
- Flutter tips: various fancy nesting of listview and pageview
- AutoCAD - set layer
- 【acwing】240. food chain
- [groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
- 3dsmax2018 common operations and some shortcut keys of editable polygons
- Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
- China as resin Market Research and investment forecast report (2022 Edition)
- [groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
- MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
猜你喜欢

Autocad-- dynamic zoom

Panel panel of UI

Unity3d learning notes

Detailed introduction of OSPF header message

Download the details and sequence of the original data access from the ENA database in EBI

2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem

AutoCAD -- dimension break

On-off and on-off of quality system construction

Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
![[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)](/img/1b/1fa2ebc9a6c5d271c9b39f5e508fb0.jpg)
[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
随机推荐
[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
JVM 原理和流程简介
2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling
#775 Div.1 C. Tyler and Strings 组合数学
Wan broadband access technology V EPON Technology
中国聚氨酯硬泡市场调研与投资预测报告(2022版)
54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
Debug insights
AutoCAD - Center zoom
[crampon game] MC tutorial - first day of survival
xss注入
Number theoretic function and its summation to be updated
China polyurethane rigid foam Market Research and investment forecast report (2022 Edition)
Rip notes [rip message security authentication, increase of rip interface measurement]
计组笔记(1)——校验码、原补码乘除计算、浮点数计算
Autocad-- Real Time zoom
flutter 对象和列表
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
SQLServer 存储过程传递数组参数
C iterator