当前位置:网站首页>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
边栏推荐
- Unity parallax infinite scrolling background
- PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
- [groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
- Autocad-- Real Time zoom
- 2021-10-29
- 2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
- [crampon game] MC tutorial - first day of survival
- The 22nd Spring Festival Gala, an immersive stage for the yuan universe to shine into reality
- Function overloading
- The remainder operation is a hash function
猜你喜欢
AutoCAD - stretching
[groovy] closure (closure as function parameter | code example)
[groovy] closure (closure call | closure default parameter it | code example)
Download the details and sequence of the original data access from the ENA database in EBI
Autocad-- dynamic zoom
AutoCAD - lengthening
Emlog blog theme template source code simple good-looking responsive
How to choose a panoramic camera that suits you?
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
Solution of circular dependency
随机推荐
Unity3d learning notes
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
MySQL audit log archiving
The principle of attention mechanism and its application in seq2seq (bahadanau attention)
【Leetcode】1352. 最后 K 个数的乘积
Thinking of 2022 American College Students' mathematical modeling competition
54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
[groovy] closure closure (customize closure parameters | customize a single closure parameter | customize multiple closure parameters | specify the default value of closure parameters)
Inline built-in function
JMeter -- distributed pressure measurement
This article is good
【acwing】240. food chain
AutoCAD -- dimension break
【acwing】837. Number of connected block points
质量体系建设之路的分分合合
GameObject class and transform class of unity
中国聚氨酯硬泡市场调研与投资预测报告(2022版)
[crampon programming] lintcode decoding Encyclopedia - 872 termination process