当前位置:网站首页>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
边栏推荐
- C iterator
- Emlog博客主题模板源码简约好看响应式
- Solution of circular dependency
- China needle coke industry development research and investment value report (2022 Edition)
- 2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
- AutoCAD - continuous annotation
- Number theoretic function and its summation to be updated
- 2021 electrician cup (the 12th "China Society of electrical engineering Cup" National Undergraduate electrician mathematical modeling) detailed ideas + codes + references
- 计组笔记(1)——校验码、原补码乘除计算、浮点数计算
- [crampon programming] lintcode decoding Encyclopedia - 872 termination process
猜你喜欢
Is $20billion a little less? Cisco is interested in Splunk?
Unity3d learning notes
"Measuring curve length" of CAD dream drawing
[crampon game] MC tutorial - first day of survival
Thinking of 2022 American College Students' mathematical modeling competition
Unity get component
AutoCAD - graphic input and output
Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
AutoCAD - continuous annotation
随机推荐
[crampon programming] lintcode decoding Encyclopedia - 1100 strange printer
54. Spiral matrix & 59 Spiral matrix II ●●
AutoCAD - stretching
【Leetcode】1352. 最后 K 个数的乘积
2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
PR first time
AutoCAD - full screen display
数论函数及其求和 待更新
Flutter tips: various fancy nesting of listview and pageview
Is $20billion a little less? Cisco is interested in Splunk?
Introduction to JVM principle and process
[goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
Create a pyGame window with a blue background
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
669. Prune binary search tree ●●
2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
[AI bulletin 20220211] the hard core up owner has built a lidar and detailed AI accelerator
Understand encodefloatrgba and decodefloatrgba
Reading and visualization of DICOM, MHD and raw files in medical imaging