I have many simple physics calculation in my script to predict future position, speed or time of the object. The distance shouldn't have any effect from the scale though. For example
If I change the timescale in Unity, how should I change the scale of variables in above equations? The above equations are all real time unit. Is it correct that I have to divide real time unit with timescale? Like this
My other question is when I get the value from rigidbody.velocity Is its unit (meter/second) already scaled with timescale or not? And when I use Addforce ForceMode.VelocityChange to change object velocity. If I want to apply velocity = 10 meter/second in real time to the object. Can I use 10 directly or do I need to scale it with timescale before apply it to Addforce?
Yes, when you are predicting what the physics will do over time. You can test this by plugging in sample values like 0.5, 1, and 2.
However, in Unity it depends what you do with these numbers. If something is going to happen at Unity Time=3 for example, it will still happen at Time=3 at half speed. It's just that Time=3 won't be seen by you until 6 seconds have elapsed. (Note: Time.realtimeSinceStartup tracks real-world time.)
The velocity value should always look the same regardless of timeScale. Think of it this way: the Unity simulation of the physics doesn't change when timeScale changes; you are just changing how quickly the results are played back.
Just apply the 10m/s as you were planning to do. The physics inputs don't change; you are just experiencing the final playback slower or quicker.
answered Sep 17 '10 at 11:17 AM
why we should use second unit in our graph?? not minute,hour or etc...especially for realtime
answered Jan 25 '11 at 06:49 PM