User:John Newell

From Unify Community Wiki
Jump to: navigation, search

My name is john and i am a mediocre programmer who found a mistake on the page http://wiki.unity3d.com/index.php/LookAtMouse the I am attempting to create an account to update this specific page. In the c sharp coding section on line 34 it currently reads

code:

   transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, speed * Time.time);

and it should read

code: transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, speed * Time.deltaTime);

the incorrect code on the page works in an unusual manner. The rotation starts off slow but as the game progresses it gets faster and faster and faster. The incorrect code works for users who have a project that requires on abject to stare at the mouse.

With my project I required a game object to rotate slowly and I needed to hunt down this issue.

Is this 50 words long?

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox