Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Maurice_B · Jul 17, 2016 at 08:38 AM · physicstimeslowmotion

Individual slow motion rigidbodys

Hi,

I'm putting together a collection of time control scripts for slow-motion and the like, I have transform driven slow-motion working but I am stuck on how to do it with rigid-bodies.

What Ideas I have so far.

  • disable use gravity and add a scaled force manually.

  • scaling the velocity when the effect is started.

Any other Ideas,

Thanks for the help

Maurice

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by TheFish657 · Jul 17, 2016 at 12:12 PM

if you want slow motion then i reccommend that you use Time.timeScale and set it to something like 0.25f for it to slow down. For any objects which you want to have unaffected by the change you can use Time.unscaledDeltaTime which is timescale - independant

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Maurice_B · Jul 17, 2016 at 12:15 PM 0
Share

I have already got slowmotion working on transform driven motion, the question is specifically about physics and rigidbodies which is more complex,

Thanks for the suggestion anyway.

avatar image TheFish657 · Jul 17, 2016 at 12:17 PM 0
Share

This works for physics too! Timescale slows down everything, not just transform driven movement

avatar image Maurice_B TheFish657 · Jul 17, 2016 at 12:51 PM 0
Share

Yeah but not object independently. eg I have 2 balls and I want one to be in slow motion and the other not. Sorry if I wasn't clear.

avatar image TheFish657 Maurice_B · Jul 17, 2016 at 12:58 PM 0
Share

Simply mutliply the speed of the object you want to not be in slow motion by time.unscaled*DeltaTime and that of the one you do want to be in slow motion by Time.deltaTime. If you are not already using deltaTime you will probsbly need to increase the speed of your object because Time.deltaTime == 1/FPS Timescale so if you're running 60FPS with a TimeScale of 0.25 then normal deltaTime will be equal to 0.064 whereas unscaledDeltaTime will be 0.016

Show more comments
avatar image Maurice_B · Jul 17, 2016 at 04:30 PM 0
Share

@TheFish657 Thanks! I found a post from a long time ago that had a method, similar to yours but you scale by the difference from the previous timescale so it is not constantly slowing down. once I have it polished up a bit I will post it as answer, I just want to see if anything better comes along.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

74 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Stabilizing ragdolls in slow motion 0 Answers

Calcule Player's Speed based on Time.timeScale 1 Answer

Stop physics without using Time.timeScale = 0? 6 Answers

Slow motion for Physics game 2 Answers

changing time messes up the speed of my rigid bodies after its gets reset back to normal 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges