- Home /
how to restrict velocity to specific magnitude when force applied equals rigid.mass * 9.8f to fly an object affected by gravity.
Hello how are you doing guys, i have got here a plane of mass 1450 having Drag 1 and angular drag 0.1, now what i'm doing actually is adding up force to the rigidbody in a way that the magnitude of the force equals the mass of rigidbody times 9.8f to make it fly, it does fly but it's too fast i want it to move in its forward direction with controlled velocity..
float lift = rigid.mass * 9.8f;
Vector3 forcedirection=transform.forward;
rigid.AddForce (forcedirection*lift);
Vector3 velocity = rigid.velocity;
velocity.y += 8f * Time.deltaTime;
velocity.z+= transform.forward.z * 0.5f * Time.deltaTime;
with all that cofiguration, it does fly but it's faster and flies over terrain within 3 seconds which 1000x1000 in width and height, how do i reduce it's velocity?
Your answer
Follow this Question
Related Questions
Why does using a temporary variable break rigidbody? 1 Answer
Calculate velocity to set to reach a target point on a plane considering the drag. 0 Answers
Move gameobject at constant speed 1 Answer
How to calculate force to apply to move object to a certain distance. 1 Answer
add force to object that has 2 different rigid bodies 0 Answers