This page looks best with JavaScript enabled

Tracking Rigidbody Velocity in Asteroids VR

 ·   ·  ☕ 1 min read

In order to better track and debug in Asteroids VR I’d like to be able to track how fast the player is moving at any point in time. To do this we’re going to add a simple tracking UI that displays our current velocity in meters per second and kilometers per hour using a canvas with a single Text element in it.

In order to grab the velocity we can just pull out the magnitude of the Rigidbody’s velocity. Then to set this up we can calculate the our mps and kph values and assign the results to our Text object.

Check out more videos on the development of Asteroids VR:

Join the World of Zero Discord Server:

Sam Wronski
Sam Wronski
Maker of things, currently helping build cloud things @ Google. World of Zero is a personal project disconnected from my professional work. Lets make something awesome together!