Reputation: 555
By default the Networked A-Frame component for A-Frame uses LERPing to smooth the animation between position and rotation updates for objects synced through the networked component. I'd like to disable that feature but the docs show a syntax example of NAF.options.useLerp
which isn't an attribute that I can set on the networked-scene
component which instead looks like this:
<a-scene networked-scene="
room: handcontrollers;
debug: true;
">
Where do I put the NAF.options.useLerp
command to disable LERPing?
Upvotes: 1
Views: 405
Reputation: 555
This code goes in a JavaScript tag anywhere in your page source after you import networked-aframe
.
Simplified example that worked for me inside of <head>
tag:
<script>window.NAF || document.write('<script src="https://unpkg.com/networked-aframe/dist/networked-aframe.min.js">\x3C/script>')</script>
<script>NAF.options.useLerp = false;</script>
Upvotes: 2