- Home /
This question was
closed Dec 19, 2017 at 04:09 PM by
dNazarik for the following reason:
Problem is not reproducible or outdated
Question by
dNazarik · Jan 04, 2017 at 05:40 PM ·
rotationquaternionangle
Error of angle
Hi.
I have a problem. A red point is position of cursor. At pressure I get the coordinates of cursor in the world and do a shot in a that point. Getting a corner, I set him as rotation of my bullet(sprite of fireball) and begin motion of bullet via
transform.Translate (Vector3.right * Time.deltaTime * mooveSpeed);
Setting an angle of bullet:
newBullet.transform.rotation = Quaternion.Euler(0, 0, rotZ);
On this screenshot corner exactly 90 degrees.
The bigger the angle is, the bigger the error is.. A bullet flies exactly directionally at the angle of 0 degree. Accordingly error is the greatest at the angle of 90 degree
снимок2.jpg
(30.2 kB)
снимок.jpg
(111.7 kB)
Comment