Skip to content

Instantly share code, notes, and snippets.

@birarda
Created December 21, 2017 23:00
Show Gist options
  • Save birarda/2e84e5206c5b96748a565a85f244ed88 to your computer and use it in GitHub Desktop.
Save birarda/2e84e5206c5b96748a565a85f244ed88 to your computer and use it in GitHub Desktop.
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
Agent.isAvatar = true;
Avatar.position = { x: getRandomFloat(0, 5), y: 0, z: 0.0 };
Avatar.displayName = "Matthew";
Avatar.skeletonModelURL = "http://mpassets.highfidelity.com/f3fbb9f4-e159-49ed-ac32-03af9056b17e-v1/matthew.fst"
var yaw = 0;
Script.update.connect(function(){
yaw += 2;
Avatar.orientation = Quat.fromPitchYawRollDegrees(0, yaw, 0);;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment