当前位置:网站首页>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
边栏推荐
- Inline built-in function
- 3dsmax common commands
- [groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
- 2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
- 2021-10-29
- 49 pictures and 26 questions explain in detail what is WiFi?
- How should programmers learn mathematics
- AutoCAD - Document Management
- Autocad-- Real Time zoom
- 3dsmax scanning function point connection drawing connection line
猜你喜欢
[goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
【Leetcode】1352. Product of the last K numbers
Emlog blog theme template source code simple good-looking responsive
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
AutoCAD - Document Management
AutoCAD - workspace settings
随机推荐
Unity3d learning notes
GameObject class and transform class of unity
Flutter tips: various fancy nesting of listview and pageview
Function overloading
English topic assignment (27)
中国针状焦行业发展研究与投资价值报告(2022版)
2020-10-27
Detailed introduction of OSPF header message
Séparation et combinaison de la construction du système qualité
2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
An article takes you to thoroughly understand descriptors
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
Personal required code
中国艾草行业研究与投资前景预测报告(2022版)
2020-10-27
How should programmers learn mathematics
AutoCAD - window zoom
[Chongqing Guangdong education] National Open University 2047t commercial bank operation and management reference test in autumn 2018
AutoCAD - stretching
#775 Div.1 B. Integral Array 数学