Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » FREE Project Downloads & Recources » Scripts » Slow motion

Slow motion

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Slow motion on Wed Jun 11, 2014 3:29 am

developer23


Moderator
Moderator
Hello guys!!! when you press the key that you put in the script, time will slow down depending on the time you write in the script.Enjoy! Very Happy
Code:

   function Update () {
      if (Input.GetKeyDown (KeyCode.E)) {
         if (Time.timeScale == 1.0)
            Time.timeScale = 0.4;
         else
            Time.timeScale = 1.0;
         
         Time.fixedDeltaTime = 0.02 * Time.timeScale;
      }
   }



Last edited by developer23 on Sat Jun 21, 2014 2:34 am; edited 1 time in total

View user profile http://masterdevelopers.altervista.org/

2 Re: Slow motion on Fri Jun 20, 2014 5:49 am

Mohammed-Mrx


Member [Lv. 1]
Member [Lv. 1]
its working , thank you

View user profile

3 Re: Slow motion on Fri Jun 20, 2014 6:00 am

developer23


Moderator
Moderator
Mohammed-Mrx wrote:its working , thank you
Of nothing Very Happy

View user profile http://masterdevelopers.altervista.org/

4 Re: Slow motion on Thu Jul 10, 2014 2:58 am

turbomaniac


Member [Lv. 3]
Member [Lv. 3]
Thank you mister

View user profile

5 Re: Slow motion on Thu Jul 10, 2014 3:22 am

developer23


Moderator
Moderator
turbomaniac wrote:Thank you mister
Of nothing Wink

View user profile http://masterdevelopers.altervista.org/

6 Re: Slow motion on Sun Jul 13, 2014 7:59 pm

SwagleToothWolf


Member [Lv. 1]
Member [Lv. 1]
How do I input this? Like, where..? Very Happy 

View user profile

7 Re: Slow motion on Mon Jul 14, 2014 2:42 am

developer23


Moderator
Moderator
SwagleToothWolf wrote:How do I input this? Like, where..? Very Happy 
You should put into the player. You can change the input, i put KeyCode E for example, but you can edit

View user profile http://masterdevelopers.altervista.org/

8 Re: Slow motion on Mon Jul 14, 2014 2:35 pm

SwagleToothWolf


Member [Lv. 1]
Member [Lv. 1]
ah ok thanks, I'm like, a supernoob to unity XDXD

View user profile

9 Re: Slow motion on Sun Jul 20, 2014 1:29 am

DARTHVADEREX


Member [Lv. 2]
Member [Lv. 2]
Thank you, very fun to use

View user profile

10 Re: Slow motion on Sun Jul 27, 2014 5:22 pm

Norex


Member [Lv. 0]
Member [Lv. 0]
developer23 wrote:Hello guys!!! when you press the key that you put in the script, time will slow down depending on the time you write in the script.Enjoy! Very Happy
Code:

   function Update () {
      if (Input.GetKeyDown (KeyCode.E)) {
         if (Time.timeScale == 1.0)
            Time.timeScale = 0.4;
         else
            Time.timeScale = 1.0;
         
         Time.fixedDeltaTime = 0.02 * Time.timeScale;
      }
   }

Is this script used in C# or JavaScript?

View user profile

11 Re: Slow motion on Mon Jul 28, 2014 2:07 am

developer23


Moderator
Moderator
Norex wrote:
developer23 wrote:Hello guys!!! when you press the key that you put in the script, time will slow down depending on the time you write in the script.Enjoy! Very Happy
Code:

   function Update () {
      if (Input.GetKeyDown (KeyCode.E)) {
         if (Time.timeScale == 1.0)
            Time.timeScale = 0.4;
         else
            Time.timeScale = 1.0;
         
         Time.fixedDeltaTime = 0.02 * Time.timeScale;
      }
   }

Is this script used in C# or JavaScript?
JavaScript

View user profile http://masterdevelopers.altervista.org/

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum