When i attach a Rigidbody to an object, it falls at a very slow speed and no matter how much I increase the mass it falls at exactly the same speed every time.
it falls about 75% slow than this Unity tutorial
There is no code attached and the rigidbody has the default settings.
There are a lot of misconceptions here. Do not do the following:
Change the force of gravity in your scene.
Add an extra force in code.
Change the mass.
~A very long time ago, Galileo found out mass doesn’t affect freefall time. I am very confident the problem with your scene is the scaling. Look at this gif:
These objects are all the same except in that they are larger than each other. Keep in mind that, in Unity, 1 unit = 1 meter. Scale everything accordingly. If everything is scaled properly, I promise everything will fall realistically. If you have an object with a very large size, it will fall extremely slowly.
i think its a coding mistake , you’re setting the rididbody.velocity.y = 0 in the code somewhere, and that makes the jumping fast (since its a force set from code) but the falling slow since its not set from code , the physics update get a few milliseconds between each Update frame to do its physics thingy but it get stopped once the velocity.y = 0 happens , or atleast thats the problem i had …
and it was working all well and fine, until I started to the jumping portion of the script, the player fell like a feather. I hadn’t changed any gravity or mass or anything like that, but what was causing the problem is that when I set rb.velocity to MoveDir, MoveDir.y = 0, so every fixed update the object was barely falling. So to fix this issue I did this
void Update()
{
float hMove = Input.GetAxisRaw("Horizontal");
float vMove = Input.GetAxisRaw("Vertical");
MoveDir = (hMove * transform.right + vMove * transform.forward + new Vector3(0, rb.velocity.y, 0)).normalized;
// i gave MoveDir a y value of whatever the y velocity was at the time, so it was essentially unaffected.
}
void FixedUpdate()
{
Move();
}
void Move()
{
rb.velocity = MoveDir * speed * Time.deltaTime;
}
I’m new, and I had the same issue, and I just found out that its simply solved with a simple script that its task is to set the object’s Y value to its current value (I don’t really know how to put it), but here is the code (make sure you put the script in the object that you want to fix);
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class physics : MonoBehaviour
{
Rigidbody rb; /*create a variable of the Rigidbody filetype, and set it to "rb"*/
void Start()
{
rb = GetComponent<Rigidbody>(); /*gives the variable a value*/
}
void Update()
{
rb.velocity = new Vector3 (rb.vector.x, rb.vector.y, rb.vector.z); /*sets the position of the object to its position in the world*/
}
}
This worked for me and I hope it does for you too!
Have you checked you have dragged the object into the scene after you’ve changed it? Rather than testing the same game object with the old settings in whilst changing settings in the inspector
I had the same problem. I just add downward force anytime the rigid body has a less that zero y vector. Playing with the amount of force will help fine tune.