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 » General Dicussions » Request » Adding slow motion effect

Adding slow motion effect

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

1 Adding slow motion effect on Sat Apr 18, 2015 8:30 am

Avinash Crysis

Member [Lv. 0]
Member [Lv. 0]
I am creating a game and i want to add a effect like a man punches someone by pressing any key and the man dies in slow motion with music behind.Plss can anyone help me with this situation.

View user profile

2 Re: Adding slow motion effect on Sat Apr 18, 2015 11:33 am


Member [Lv. 3]
Member [Lv. 3]
This will allow time to slow down by 50%. Feel free to adjust the number. Then change the time back to normal with 1.

Time.timeScale = 0.5f;

0 = Stop
1 = Normal
2 = Double the speed

View user profile http://vgbam.com/

3 Re: Adding slow motion effect on Tue Apr 21, 2015 9:25 am



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

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