Skip to content
Snippets Groups Projects
Commit a906ac59 authored by johnshaughnessy's avatar johnshaughnessy
Browse files

Don't move the character unless you're in the scene

parent 1240264f
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ AFRAME.registerComponent("character-controller", {
const startScale = new THREE.Vector3();
return function(t, dt) {
if (!this.el.sceneEl.is("entered")) return;
const deltaSeconds = dt / 1000;
const root = this.el.object3D;
const pivot = this.data.pivot.object3D;
......
......@@ -94,6 +94,8 @@ export default class SceneEntryManager {
this.store.update({ activity: { lastEnteredAt: new Date().toISOString() } });
});
})();
this.scene.addState("entered");
};
whenSceneLoaded = callback => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment