-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|