How to rotate object in time / Why my Input.GetMouseButtoDown is slower than my Keyboard one?
Hello, Absolute beginner here, so I apologize in advance.
I have two questions:
1) When a Input.GetKeyDown happens, I would need to transform.Rotate an object by (0,0,-40). This should happen smoothly: let's say in a couple of seconds.
I really can't understand how to make this rotation happens! I don't quite understand how to make SLerp and Lerp work, and Quaternions are even worst... I'd like the simplier possible way to make this thing. I am sure is super easy but I am stuck.
2) I gave to a mouse Input and a keyboard Input the same command (this to be able try my game from computer and from mobile device as the mouse button click = touch). But while the keyboard Input is correctly working, the mouse click is somehow "slower" and it does continue its Input even in the very next frame. The problem is that from this new frame the situation is different and I don't want the command to STILL happen because a click Input now means a NEW command. I have now a sigle click having 2 effects no idea why. As I said the keyboard works well and I have to digit twice to have the 2 Inputs.
That's it... first time for me asking help here after having read a lot and having found a lot of solutions! So I hope someone can help :)
Your answer
Follow this Question
Related Questions
Limit a rotation (transform.Rotate with Input.GetAxis) ? [C#] 1 Answer
problems with mopub 0 Answers
It does not work removing items from the inventory 0 Answers
how can i control scale speed ? 1 Answer
Building system problem 0 Answers