Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 2D Blocks
  4. 2D Physics Time Speed

2D Physics Time Speed

Scheduled Pinned Locked Moved 2D Blocks
1 Posts 1 Posters 637 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

    Introduction

    When you are using the 2D physics engine, the movement of every object is controlled by the physics engine. Normally the time in the physics world is the same as in the real world. However, you can speed up or slow down the physics world by changing its speed of time.

    For example, suppose you want to show a slow-motion effect. A “bad” solution is to reduce the speed of every object, and also all the forces including gravity. A much simpler method is to slow down the time of the physics world.

     
     

    Set Physics Time Speed

    To change the speed of time in the physics world, you can run the following block after the physics world has been initialized.

    2e9dfce6-f0f9-4020-aeae-c3dff20af1af-image.png

     
    When the input is 100, the speed of time in the physics world is the same as in the real world.

    If it is smaller than 100, time goes slower, which means all objects move slower. When the input is 0, time stops, which can be used to pause the game.

    If the input is more than 100, then things move faster than in real time.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode