- Home /
if I rotate an object, do they vertices of its mesh change?
I've got an object with a custom mesh, with all the vertices stored. I wish to track these vertices when the object is rotated. How do i track these vertices or do they even change on rotating. I want to instantiate another object using the location of the last vertex of this object, after this object is rotated, if I instantiate it using the last vertex I have stored, it gives the location before the rotation is applied. In the picture, the second rectangle should start from the top-left point of the first rectangle. Any help is appreciated.
Answer by varunindralal · Nov 20, 2018 at 04:15 PM
Hi, I found out how to achieve this. I applied the same rotation to the vector3 which referred to the top left corner. This gave me the correct co-ordinates of the rotated top corner. The method I used to apply the rotation was,
startPoint = Quaternion.Euler(0, -7.5f, 0) * topLeft;
Where 7.5f is the angle i was rotating around the y axis. Thanks.
Your answer
Follow this Question
Related Questions
how to decrease vertices number of a sprite 0 Answers
Multiple Meshes 0 Answers
Create a droplet wave effect using Mesh deformation 0 Answers
Edit SkinnedMeshRenderer 1 Answer