I’d like to run an individual Rigidbody in slow motion, while the other physics in my scene runs at normal speed. Ideally, it would be nice to run each individual rigid body at an individual physics speed.
It does raise some interesting questions about how different speed rigidbodies should interact with each other, but for now I’m just wondering if it’s possible in Unity.
Is there a way to modify the speed of physics per object?
I’m not sure I understand what you mean by “physics speed” here… but wouldn’t making things react to forces differently fall under how you set “drag” and other settings?
Not necessarily, as setting “drag” to a high value in order to slow down an object would cause deceleration, rather than just a change in the time scale.
This is an interesting problem, I’m not really sure how you could do it. Perhaps you could manually update an object’s position by reading in the objects velocity from the rigidbody component… something along the lines of
// Do this on Start
Vector3 cachedPosition = transform.position;
// Do this in FixedUpdate
transform.position = (cachedPosition += rigidbody.velocity * Time.deltaTime * objectTimeScale);
This would have some strange side-effects in terms of the physics system, but I think it would achieve the desired effect without too much messing around with object properties…
Why not just adjust the force vector applied to said object? For instance, if all objects are moving at Vector3.right. So, all are at Vector3(1,0,0), and you want to slow one down, just adjust its velocity, to half.