Last week we launched support for real-time physics in Mattercraft. Leveraging the Havok physics engine you can now add lifelike physics and interactions to your projects with zero code, enhancing your immersive experiences across augmented reality, virtual reality and mixed reality.
Physics is the simulation and manipulation of objects in a virtual environment to mimic their real-world behaviour. This includes how things move, interact, and respond to forces like gravity and collisions.
For creators; using physics avoids painstaking animation sequences and allows them to build more immersive and interactive experiences, whether in gaming, virtual reality, mixed reality or augmented reality.
Tools and libraries like Three.js have been a common way amongst developers to implement web-based physics. While powerful, we’ve found these require extensive scripting and setup, which comes with a steep learning curve for a lot of creators
However, Mattercraft's intuitive visual interface allows for simple set-up and customisation of physics within your project without any code. With the added option for developers to dive into the TypeScript IDE to create more bespoke behaviours while saving time applying:
Mattercraft’s real-time simulation also allows you to test your physics directly in the viewport streamlining development by eliminating the need for lengthy build or local server processes.
Apply physics to your next Mattercraft project with zero code in 5 simple steps:
Step 1: Importing the Object
Drag and Drop: Start by dragging a 3D model from the asset portal into your project files.
Positioning in the Hierarchy: Drag the imported model into the hierarchy.
Step 2: Scaling the Object
Adjust the Scale: Select the model in the hierarchy and scale it up so it's easily visible within your scene.
Step 3: Adding Physics
Navigate to the Behaviours Panel: With the model selected, go to the behaviours panel in the GUI.
Add Physics Behaviour: Click the plus icon and select 'Physics Behaviour' -> ‘Rigid Body’ from the menu to add physics to your chosen 3D model.
Step 4: Configure Physics Parameters:
Motion Type: Set the motion type to 'Dynamic' if you want the model to move and interact with forces, or 'Static' if it should act as an immovable object.
Material Properties: Adjust material properties like bounciness and friction based on how you want the model to interact when it comes into contact with other objects. You can add a physics material to unlock even more properties.
Mass and Gravity: Modify the mass to affect how gravity impacts the model and adjust the gravity factor if necessary.
Adjust the collider: You can also override the default mesh collider, with more performant shapes, or a convex hull.
Step 5: Simulating Physics
Real-Time Simulation: Click the 'Play' button at the top of the GUI to start simulating physics. You should see the model behaving according to the physics properties you've set.
Adjust and Test: If the model doesn’t interact as expected, stop the simulation, make adjustments, and test again until satisfied with its behaviour.
You can use physics with the Augmented Reality by Zappar package and utilise the various best-in-class tracking types (image, face, and world tracking) to build standout AR experiences.
Create Virtual or Mixed Reality content that reacts realistically to user and environment interactions across various headsets like Apple Vision Pro, Meta Quests, Magic Leap, Pico, and more. We have an easy-to-use "Grabbable" component, perfect for Mixed and Virtual Reality content for both hands and controllers.
With a range of templates to choose from, it's never been easier to get started building rich and immersive experiences for the web. Whether you’re looking to level up your AR projects or add realism to your mixed reality or virtual reality experiences, Mattercraft offers the power and flexibility to help you get there.