当前位置:网站首页>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
- [Business Research Report] top ten trends of science and technology and it in 2022 - with download link
- CSDN body auto generate directory
- How to choose a panoramic camera that suits you?
- 3dsmax scanning function point connection drawing connection line
- This article is good
- History of web page requests
- 【acwing】240. food chain
- Leetcode 222 number of nodes of complete binary tree
- 3dsmax snaps to frozen objects
猜你喜欢
【Leetcode】1352. 最后 K 个数的乘积
AutoCAD - graphic input and output
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
2021-10-29
An article takes you to thoroughly understand descriptors
质量体系建设之路的分分合合
AutoCAD - full screen display
質量體系建設之路的分分合合
Flutter tips: various fancy nesting of listview and pageview
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
随机推荐
[Business Research Report] Research Report on male consumption trends in other economic times -- with download link
2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling
Unity synergy
2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
【Leetcode】1352. Product of the last K numbers
C iterator
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
54. Spiral matrix & 59 Spiral matrix II ●●
2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
Unity and database
xss注入
2020-10-27
Use assimp library to read MTL file data
MySQL in-depth learning - index creation and deletion, index design principles, index failure scenarios, query optimization, index push down ICP
3dsmax2018 common operations and some shortcut keys of editable polygons
中国艾草行业研究与投资前景预测报告(2022版)
Flutter 小技巧之 ListView 和 PageView 的各种花式嵌套
AutoCAD - graphic input and output
AutoCAD - workspace settings
mysql審計日志歸檔