ME FIRST GAMES
Menu

games for me and you

What is a Rigidbody?

6/14/2020

0 Comments

 
Picture
📌 Rigidbodies control an object's position and rotation through physics simulation.
📌 Simulating physics for a specific GameObject is as simple as adding a rigidbody component.
📌 Paired with a collider, modify the properties on your rigidbody to get it to behave as intended.
📌 Set the Mass, Drag, Angular Drag, and toggle gravity through the inspector windows.
📌 Is Kinematic - When enabled, forces, collisions, or joints will not affect the rigidbody. Movement must be controlled manually through a script. This is more advantageous than a collider alone because interpolation options are available and velocity is readable from the rigidbody.
📌 Interpolate - Allows you to smooth out the effect of running physics at a fixed frame rate. This means, the transform position and rotation will be updated every frame to be (smoothed out), however, the rigidbody won't be updated until the next physics frame.
📌 Collision Detection - Allows you to trade performance for better collision detection between physic frame updates. Use this for fast-moving objects or objects that constantly penetrate through thin walls or colliders.
📌 Moving a rigidbody is different from moving a transform. Rigidbodies can be teleported by setting rigidbody.position and you can interpolate between positions by using Rigidbody.MovePosition. Normal transform position adjustments will not update the rigidbody. It's easy to call the wrong method here, so make sure to move objects according to your needs.
📌 Constraints allow you to lock an object's rotation for a positional or rotational axis. This is a great feature for 2.5d games.
📌 Position, velocity, force, max velocity, and much more can be controlled through scripting. If learning, I recommend you create a scene with some objects and rigidbodies, and play around with them, it's fun. 

0 Comments



Leave a Reply.

    Picture
    Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
    GAMES HERE

    Red Matter

    Star Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.

    Archives

    April 2021
    February 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2019
    March 2019
    December 2018
    April 2018

    Categories

    All

    RSS Feed

Copyright (c) 2020 Me First LLC
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments
  • STU the First AI
  • Blog
  • Contact
  • Unity Tools
    • Hierarchy Comments