Sample Unity Physics by omundy - 1

PhysicsGames & Projects

Sample project showing movement and physics in Unity

Unity 2020.1.2f1Unknown LicenseUpdated 22 days agoCreated on September 21st, 2020
Go to source

Sample Unity Physics

A sample Unity (2020.1.2f1) project that shows

  • Essential physics concepts in Unity
  • C# inheritance with base and child classes
  • Basic use of the URP (Universal Render Pipeline)



A Hello World! for basic physics in game engines. Just press play!

  • What happens when you move the RigidBody from a letter to its individual cubes?
  • What happens when you turn the Fish GameObject on while the game is running?



Examples of common methods for moving GameObjects in Unity. See the class reference sheets on movement with transform.position and physics for more details.

  • CubesTranslate
    • Four examples using transform.Translate() to “teleport” GameObject position.
    • Controlling transform directly is fine for simple movement but all physics interactions (collisions, etc.) will not work as expected.
  • CubesMovePosition
    • Four examples using Rigidbody.MovePosition()
    • This method manipulates transform.position inside FixedUpdate(), but calculates collision (mostly) along the way.
  • CubesAddforce
    • Four examples using AddForce().

Unity Physics Resources

See these tutorials for more on Unity and Physics

URP (Universal Render Pipeline)

You can create a URP project using an option inside Unity Hub. When converting from legacy rendering to URP:

  • Install URP Package
  • Create URP asset and add to graphics settings
  • Camera - Check rendering settings
  • Scene - Use Lighting Settings
  • Ensure all your materials use URP shaders
Show all projects by omundy