{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Quick start guide for Havok Physics | Havok Physics for Unity | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Quick start guide for Havok Physics

    This guide aims to get you up and running as quickly as possible with Havok Physics for Unity.

    The steps below make use of the Unity Physics Samples publicly available on GitHub (see the Unity Physics Samples documentation for more details).

    Adding the Havok Physics for Unity package

    1. Get the Unity Physics Samples if you don't already have them.

    2. Open the PhysicsSamples project

    3. Add the Havok Physics package..

      ..via Package Manager

      1. Open Unity's Package Manager from the Window > Package Manager menu item
      2. Select Packages: Unity Registry, select and install Havok Physics for Unity. Note that the Install button is at the top right of the window.

      ..or via zip download

      1. If receiving the packages outside of the package manager unzip Havok.Physics.zip to desired package directory outside of the new clone directory e.g. D:\Packages\
      2. Locally modify the samples project's manifest to add this package as a dependency.
        "dependencies": {
        ...
        "com.havok.physics": "file:D:/Packages/Havok.Physics/com.havok.physics",
        ...
        }
        
    4. Ensure the Havok Physics plugin is installed by checking in the Packages subfolder.

    Change a scene to simulate with Havok Physics for Unity instead of Unity Physics

    1. Open the Pyramids test scene located in Assets\Tests\Pyramids.
    2. Press Play to simulate the scene using the stateless Unity Physics backend.
    3. Stop the simulation to reset the pyramid stack.
    4. Toggle on the PyramidsSub subscene in the scene hierarchy.
    5. Select the Physics Settings node.
    6. In the inspector, change the Simulation Type of the Physics Step component from Unity Physics to Havok Physics.

      Note: the Simulation Type in the Physics Step component can also be toggled at runtime as well.
    7. Press Play to simulate the scene using the Havok Physics backend.
    8. In the Game tab use the left mouse button (LMB) to click and drag dynamic rigid bodies. Holding the right mouse button (RMB) activates mouse look and the 'ASWDQE' keys move the camera.
    9. Observe that the simulation is more stable than it was in Unity Physics, due to the use of simulation caches in Havok.Physics. This is just one example of how Havok produces a more realistic behavior.

    The Havok Physics simulation behavior can be further configured in any scene by using the Havok Configuration component. The simulation can also be analysed with the Visual Debugger.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)