- Home /
Where is the general Rigidbodies Drag?
Hello guys, I've created a new project today on Unity and I realized that the rigidbodies are so slow to fall for example, I've been researching and the problem is the coefficient drag BUT I can't find it anywhere... I've been searching on Physics Manager on Project Settings and I didn't find it... Could someone tell me how can I resolve this without increase the gravity? Thanks in advance.
I'm not sure there is such a thing. Doesn't each rigidbody have it's own personal drag?
I seem to recall some people complaining that personal RB drag of 0 made a bouncing ball bounce all the way back up, then even then some. Which would mean there's no secret additional source of drag.
The Intro sections mention to check scale. Not using 1 unit = 1 meter can result in slow-looking falls. How large are you objects?
I'm not going to answer this b/c I don't know for sure if it works...but I'll comment it here.
You could do it through code and drag - for example, for every object you want to fall quicker, put the tag as "RBody", then:
public class InitScript : $$anonymous$$onobehaviour
{
void Start()
{
GameObject[] bodies = GameObject.FindGameObjectsWithTag("RBody");
foreach(var go in bodies)
{
rb = go.GetComponent<Rigidbody>();
rb.drag = 0;//or whatever you want it to be (play around)
}
}
}
Then just attach the InitScript to some object in your game.
I know how drag works for each rigidbody but I mean the general drag because in Unity 4 was "Drag Coefficient" or something like that, obviously the drag of each rigidbody is 0 (http://gyazo.com/ef8486de077f49a233e6185c34fc1aec) but I don't know why is so slow...
Answer by starikcetin · Jun 29, 2015 at 10:11 PM
Movement and scale are relative. Think that you are in space and have "nothing" (literally nothing) nearby you. Than can you say that you are moving, turning, standing up or upside-down? You can't. The velocity and movement are measured relative to another referance.
The measure units we use in real life are all scaled from a "referance" defined by General Conference on Weights and Measures, in International System of Units (a.k.a. SI units). There is no measure unit that references it's own. For example "Meter" measurement: 1 meter is defined with the distance that light travels in 1/299.792.458 seconds.
Physics system in unity works in that way too. You may notice that there are no measure units in rigidbody settings, that's because we don't need them to adjust our virtual world. You can set one of your object's mass to 1 and other to 2 and the second one will be double weight of first. And will actually go double slower than the first one if you apply same force to both of them.
So, if you adjust every rigidbody and scale value to real values in you scene, then every physics operation may seem more realistic too.
Best wishes!
Answer by Novodantis · Jun 29, 2015 at 09:29 PM
If your Rigidbodies have a drag of 0 already, then this is probably a scale issue as Owen Reynolds says. Remember that falling speed is an acceleration, 9 metres per second per second. Therefore, scale is important. If your object is 9 metres tall, it will accelerate by its own height each second. If it is 90cms tall, it will appear to move ten times quicker. Note: Unity scales relative to parent. One way to measure reliably is to create a fresh unparented Cube and place it alongside your object. The cube is 1 cubic metre.
If the scale is right, its falling speed should be correct for an object of that size in a vacuum, assuming drag is still 0 (this is actually faster than it would be in conventional experience, but not by a noticable amount initially). If it still looks slow, I would check your Time settings.
If the time is also set standard, all objects should be falling correctly. It may be an optical illusion if the fall looks slow.
The scale is correct, the time too and this is still slow... I'm with Unity for 2 years and I didn't see this before. This is not normal.
@Tonyx97:
That doesn't make much sense. You either have a script which applies counter forces to your RB or drag isn't 0. What is actually "slow" to you? have you checked / logged the rigidbody's velocity over time?
That's odd. Is this also the case in an empty new project?
Okay, you can try this test to deter$$anonymous$$e if the speed just looks slow or actually is slow:
Create a cube at 0,0,0
Add a rigibody with 0 drag
Add the script at the bottom
Check the output value (with standard gravity) to this fall-distance calculator. If it is roughly correct, your fall speeds are down to either slowed time or an optical illusion. As s.ta.c points out, a big part of what "looks right" is down to reference with real world objects and it can often look weird.
Hope that helps! (apologies for terrible code formatting in comments)
using UnityEngine;
using System.Collections;
public class FallCheck : $$anonymous$$onoBehaviour {
public float fallTime = 5;
private bool output;
void Update () {
if (Time.timeSinceLevelLoad > fallTime && !output){
Debug.Log ("Fallen: "+transform.position.y);
output = true;
}
}
}
Thanks you, I don't know why it works correctly now.. $$anonymous$$aybe optical illusion? $$anonymous$$aybe I realized that with your test the physics are correctly set and now It seems correctly for me... Brain magic haha.
Answer by Tonyx97 · Jun 29, 2015 at 10:02 PM
Yes it's a "empty" project, just created, and I put some rigidbodies, shall I configure something? I don't remember nothing about changing "gravity" or something like that when I started a new project. edit: sorry for post answer I didn't realize.