TurnModifier
How do I use Turn Modifier
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
62 | transform.Rotate( 0, Input.GetAxis( "Mouse X" ) * TurnModifier, 0 ); | 1 |
File name: RPGCamera.cs
Copy
58 void UpdateRotation()
59 {
60 if( Input.GetMouseButton( 0 ) == true || Input.GetMouseButton( 1 ) == true )
61 {
62 transform.Rotate( 0, Input.GetAxis( "Mouse X" ) * TurnModifier, 0 );
63 }
64
65 if( Input.GetMouseButton( 1 ) == true && Target != null )
66 {
67 Target.rotation = Quaternion.Euler( 0, transform.rotation.eulerAngles.y, 0 );
68 }
69 }
TurnModifier 114 lượt xem
Gõ tìm kiếm nhanh...