Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie authored Oct 10, 2024
1 parent 8af2ad2 commit d0a587e
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions package/Runtime/Physics/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
# Physics

## Intro
Use Rigidbody and Collider components to make objects physical and collide with each other - without writing a single line of code.

Unity utilizes Nvidia's PhysiX engine while Needle utilizes [Rapier](https://rapier.rs/).
Needle Engine supports Box-, Sphere-, Capsule- and Meshcolliders, gravity and drag settings as well as physics materials to control friction and bounciness.

But all you need to know is [the list of supported components](https://engine.needle.tools/docs/component-reference.html#physics) that work right out of the box.

---

## Basics

Physics in unity is comprised of two elements. The Rigidbody and the Collider where the rigidbody is the logic and the collider is the shape.

Adding a rigidbody to an object without a collider will result in an object that is endlessly falling since gravity is applied to it. By adding a collider the object can finally collide with the ground and stop falling.

Note that colliders can be in the children of an object that has a rigidbody and not only on the same game object.

## Raycasting

Raycasting is fundamentally like emitting a laser with limited length, and if the laser hits something, we get that contact as a result.

For more information visit [documentation](https://engine.needle.tools/docs/getting-started/for-unity-developers.html#raycasting).

## Snowglobe

Showcases how to reset rigidbodies to their initial position. The scene works everywhere, including QuickLook.
If you need more control you can use the built-in event functions to react to collision or trigger events or interact with the underlying physics engine (Rapier) directly.

0 comments on commit d0a587e

Please sign in to comment.