Hieeee frnds,
i have been using Unity from last 2 weeks so u can say im very much new to Unity… i have written code for Morphing of Single Object using single mesh for the iPhone.
in my previous code i have used Input.mousePosition for taking the Mouse Coordinates when im rotating the camera or doing nothing im getting the FPS of 30 when im morphing a particular part of the mesh say for Nose im getting FPS of 15 - 17 which is okkkkk.
now im have written the code using iPhoneInput
for using multiple touch for scaling single touch for dragging im FPs has reduce to 8 - 10 even if i have just selected the particular part of the mesh(say nose) not performing any operations when i do so operations even of dragging (note the dragging rest of the code is same as before apart from scaling ) the FPS still reduces to 2 - 3
wht causes the FPS to drop when im using iPhoneInput
does anyone as any idea???
I don’t know why switching from Input to iPhoneInput would do that, but it may be instead related to GUI Layout. If you have any GUI elements, put this line in their Awake() method:
this.useGUILayout = false;
Without this, touching the screen while GUI elements are on-screen (like GUIText) will cause your game to slow down significantly during the touch.
well im using multitouch to get scale Up down the particular area in the mesh
to get the position positionDelta im calling iPhoneInput.GetTouch(0).xx iPhoneInput.GetTouch(1).xx
Ya i do but tht code is common for bit Input.xx iPhoneInput.xx
so i dont thing tht might b the main problem. anyways i have manage to improve FPS by a little margin but its still not the same as the Input.xx
That’s very strange. I haven’t noticed that being a problem for me. Anyway, if you haven’t already, be sure to add the GUILayout line above to any GUI elements you have. Even though you may not use GUILayouts, without it, touching the screen WILL, guaranteed, slow your game down to about 15fps every time.