How to change the true position in movement controller
<a-entity naf_limit id="rig" networked="template:#avatar-template;attachTemplateToLocal:false;" movement-controls="constrainToNavMesh: true; controls: checkpoint, gamepad, trackpad, keyboard, touch;" position="-7 0 1"> <a-entity id="player" camera position="0 1.6 0" look-controls="pointerLockEnabled: true" > <a-cursor nav-pointer raycaster="objects: [nav-mesh]"></a-cursor> <a-sphere class="head" visible="false" random-color scale="0.45 0.5 0.4" position="0 0 0"> </a-sphere> </a-entity> </a-entity>
document.getElementById('rig').setAttribute('position','-5.7 0.2 -1.4');
When I need to teleport the player's position to somewhere, it does successfully when the event triggered, but it will be suddenly teleported back to the original position if I move with W, S, A, D keys. How can I do teleportation correctly with this?