ME FIRST GAMES
Menu
games for me and you
![]() Unity and other modern game engines offer built-in physics support. Unity specifically, empowers you with colliders and rigidbodies. These simulate physics but also give you the ability to manipulate and apply your own forces. 📌 Rigidbody.AddForce applies a force to any dynamic rigidbody. 📌 The ForceMode passed in allows you to control the type of force given. 📌 ForceMode.Force: Add a continuous force to the rigidbody, using its mass. I like using this for mechanics that push or pull over time, and larger (more massive) rigidbodies are harder to push. 📌 ForceMode.Acceleration: Add a continuous acceleration to the rigidbody, ignoring its mass. This is good for mechanics that push or pull rigidbodies of any size at the same rate. 📌 ForceMode.Impulse: Add an instant force impulse to the rigidbody, using its mass. Use this for pushing the character, where a short burst of force occurs, knocking back you back. 📌 ForceMode.VelocityChange: Add an instant velocity change to the rigidbody, ignoring its mass. I personally enjoy using this inside a character's movement controller. It gives you granular control over a character's velocity and movement while still working within the physics system. 📌 Rigidbody.AddForceAtPosition applies a force at a given position. This can make your explosions even more realistic because torque will be applied at the same time. Watch boxes tumble and fly away. 📌 Rigidbody.AddRelativeForce applies a force relative to the rigidbodies rotation. It's important to not confuse the transform rotation with the rigidbody rotation, which may be updated less frequently than the transform rotation. 💬 Did I miss something? Leave a comment down below ⬇️
0 Comments
Leave a Reply. |
Me First Games is an independent game studio dedicated to creating unique and bizarre video games.
Red MatterStar Impact is an upcoming adventure platformer coming to PC, Mac, and Linux.
Archives
April 2021
Categories |
Copyright (c) 2020 Me First LLC
|