Tag Info

Hot answers tagged

3

You can extract the translation by removing the top three elements of the fourth column, (1,4), (2,4) and (3,4); You can determine the scale by finding the determinant of the top-left 3x3 elements. The determinant of a plain rotation matrix is 1, so any value above or below that is the scale factor. Note that this is only true for uniform scale; per-axis ...


1

I don't know about the rotation part but for the mapping input to rotation you can do the following: (this doesn't go in code) add 32768 to your input getting a value 0-65535 from here you can get your multiplier which is 90/65535 = 0.00137 then to get your rotation distance you can simply multiply your input by your multiplier (this goes in code) ...


1

Something i forgot to include was the fact the camera was moving with the ships. When I made the Camera stationary it seamed to work perfectly, so i simply created another camera and kept it at Vector3(0,30,0) and used it to track the mouse instead. Changing the code slightly to be: public static Quaternion RotateToMouse(this Ship ship, Transform ...



Only top voted, non community-wiki answers of a minimum length are eligible