IntroductionIn the previous section, I described how to implement a ray-to-triangle cross-detection algorithm. However, we should know that in game development, a model has a lot of triangles, if you want to all objects, all the triangles to do this detection, even if the current computer computing ability, is not efficient to complete. Therefore, we need to use other means to remove some of the objects tha
even if there is no collision. So again, you can improve the accuracy by performing Ray and ball Collision Detection on small ball surrounded by different modelmesh models. Large and fast objects
The collision detection method described earlier requires that fast objects be very small, similar to a point in 3D space. However, when a fast object cannot be regarded as a point, you need to regard it as a ball
use transform. LookAt instead
Quaternion.lookrotation]
4 How do I achieve 2 gameobject face-to-face, the z-axis relative?
Ax: After a week of review, repeated verification, sure enough in the system to learn 3D math, to achieve the function can be, as follows:Reference blog:A brief introduction to the coordinate system: C # Programmer's Consolidation of Unity 3D notes (eight): Introductio
use transform. LookAt instead
Quaternion.lookrotation]
4 How do I achieve 2 gameobject face-to-face, the z-axis relative?
Ax: After a week of review, repeated verification, sure enough in the system to learn 3D math, to achieve the function can be, as follows:Reference blog:A brief introduction to the coordinate system: C # Programmer's Consolidation of Unity 3D notes (eight): Introductio
C # programmer's Unity 3D note (10): Unity3D mathematical model of displacement and Rotation??
The core reason is that the concept of 3D mathematics in U3D is not flexible enough. So the system learns again-the third learning 3D mathematics.
This time, we hope to implement the following simple functions:
For exampl
. These two rays use the octal tree of the spatial model to obtain the intersection position of the 3D model, and obtain the method vector of the intersection and the distance from the intersection to the intersection, then, based on the relationship between these two vectors, we can determine whether the current element is inside the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.