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
Share
Go down
avatar
Moderator
Moderator
Posts : 329
Points : 2176
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Slow motion

on Wed Jun 11, 2014 3:29 am
Message reputation : 100% (1 vote)
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
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 1575
Rep : 0
Join date : 2014-03-31
View user profile

Re: Slow motion

on Fri Jun 20, 2014 5:49 am
its working , thank you
avatar
Moderator
Moderator
Posts : 329
Points : 2176
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Re: Slow motion

on Fri Jun 20, 2014 6:00 am
Mohammed-Mrx wrote:its working , thank you
Of nothing Very Happy
avatar
Member [Lv. 3]
Member [Lv. 3]
Posts : 16
Points : 1689
Rep : 4
Join date : 2013-12-15
View user profile

Re: Slow motion

on Thu Jul 10, 2014 2:58 am
Thank you mister
avatar
Moderator
Moderator
Posts : 329
Points : 2176
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Re: Slow motion

on Thu Jul 10, 2014 3:22 am
turbomaniac wrote:Thank you mister
Of nothing Wink
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 1470
Rep : 0
Join date : 2014-07-13
View user profile

Re: Slow motion

on Sun Jul 13, 2014 7:59 pm
How do I input this? Like, where..? Very Happy 
avatar
Moderator
Moderator
Posts : 329
Points : 2176
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Re: Slow motion

on Mon Jul 14, 2014 2:42 am
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
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 1470
Rep : 0
Join date : 2014-07-13
View user profile

Re: Slow motion

on Mon Jul 14, 2014 2:35 pm
ah ok thanks, I'm like, a supernoob to unity XDXD
Member [Lv. 2]
Member [Lv. 2]
Posts : 6
Points : 1472
Rep : 0
Join date : 2014-07-18
View user profile

Re: Slow motion

on Sun Jul 20, 2014 1:29 am
Thank you, very fun to use
Member [Lv. 0]
Member [Lv. 0]
Posts : 1
Points : 1456
Rep : 0
Join date : 2014-07-27
View user profile

Re: Slow motion

on Sun Jul 27, 2014 5:22 pm
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?
avatar
Moderator
Moderator
Posts : 329
Points : 2176
Rep : 43
Join date : 2014-03-12
Age : 18
Location : Italy
View user profilehttp://masterdevelopers.altervista.org/

Re: Slow motion

on Mon Jul 28, 2014 2:07 am
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
Back to top
Permissions in this forum:
You cannot reply to topics in this forum