VR template

A cross-platform WebXR template for A-Frame VR — with controller support, teleportation, physics, lighting, animation and sound.

Controllers & physics

The scene above is set up to use physics that work with VR controllers and the desktop cursor, allowing users to interact with elements realistically. Objects can be thrown and have weight, set in a scene with gravity. The balls roll and bounce, the cubes tumble and they all make a sound as they interact with the scene and each other. Desktop users can use the WASD keys to navigate, and use the mouse to look around and grab objects.

Controller support with physics

Animations

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

Teleportation

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

Hope this setup can be useful for anyone just getting into VR scene creation and A-Frame VR. We would love to see what you create from it!

Here’s the direct link to the VR scene.

VR template

Leave a reply

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