New answers tagged

0

Here is how I fixed this problem. I disabled my touch scripts and rebuilt and I was still getting touch movements so then I figured that every script I've tried work just fine. Cinemachine's free look camera naturally accepts inputs from both touch and mouse for it's ability to look around. So my code only checks if a touch is over a UI object before ...


0

I hope I can help in this matter,but for rotation: public class TouchRotate : MonoBehaviour { public GameObject obj; public float power; float posTouchBegan; private void Update() { if (Input.touchCount > 0) { if (Input.GetTouch(0).phase == TouchPhase.Began) { posTouchBegan = ...


1

Your main problem is that you're checking for input in FixedUpdate. FixedUpdate is not guaranteed to run every frame, or only once per frame. It will run however many times the physics simulation needs to "catch up" to the current frame time, acting in fixedTimestep intervals. So by handling input here, you run the risk of skipping or double-handling ...


Top 50 recent answers are included