当前位置:网站首页>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
边栏推荐
- English topic assignment (27)
- Detailed introduction of OSPF header message
- The remainder operation is a hash function
- AutoCAD - Document Management
- AutoCAD - set layer
- Unity parallax infinite scrolling background
- 669. Prune binary search tree ●●
- China as resin Market Research and investment forecast report (2022 Edition)
- AutoCAD - Center zoom
- 49 pictures and 26 questions explain in detail what is WiFi?
猜你喜欢

LeetCode之单词搜索(回溯法求解)

【acwing】528. cheese

AutoCAD - window zoom
![[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator](/img/cc/06580ce7b553182968d273841a78b4.jpg)
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator

Decryption function calculates "task state and lifecycle management" of asynchronous task capability

xss注入

次小生成树

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

Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套

How should programmers learn mathematics
随机推荐
2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Emlog博客主题模板源码简约好看响应式
AutoCAD - Document Management
Sixth note
AutoCAD - full screen display
Panel panel of UI
SQLServer 存储过程传递数组参数
Wenet: E2E speech recognition tool for industrial implementation
AutoCAD - lengthening
LeetCode之单词搜索(回溯法求解)
Unity synergy
AutoCAD - Center zoom
49 pictures and 26 questions explain in detail what is WiFi?
[groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator
"Measuring curve length" of CAD dream drawing
Mode in BST (binary tree & Notes on question brushing)
Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis