WebXR template

A starter template for A-Frame VR — with physics, teleportation, interactivity, animation and sound.

VR controllers & physics

This scene is set up with realistic physics that work with your VR controllers or desktop pointer, allowing users to hold and throw objects. The balls roll and bounce, the cubes tumble and they all make a sound as they interact with the scene and each other.

VR physics with controller support

Teleportation

Navigating a scene in virtual reality can quickly induce motion sickness, so the best option usually is to teleport instantly. The scene utilises a simple point and click navigation with minimal styling.

Animations

There are multiple ways to animate elements in A-Frame. Below I’ve arranged a few examples of animations I commonly use, and how to combine them to make more interesting effects.

Here are the direct links to the VR scenes. Desktop users can use the WASD keys to navigate, then click and hold to simulate grabbing with a controller.

VR object interaction with physics

Animations

Hope these scenes can be useful for anyone just getting into VR scene creation and A-Frame. Would love to see what you can create from them!

Leave a reply

Your email address will not be published. Required fields are marked *