Exploring A-frame () for my scene creation has been exciting. I am curious about how I can dynamically adjust the physics in my virtual world using the A-frame physics component. The goal is to have the physics within my scene be determined by a variable called x. Is there a way to achieve this?
Link to my scene code: https://jsfiddle.net/AidanYoung/1cmgLkrp/2/ Link to the physics component code: https://github.com/n5ro/aframe-physics-system
Currently, the physics settings in my scene are established using the <a-scene>
tag and it's currently fixed at -10. My aim now is to align the physics with the value of variable x. Below is an excerpt of my code where the physics configuration is defined:
<a-scene background="color: lightblue;"
renderer="antialias: true; gammaOutput: false;"
light="defaultLightsEnabled: true;"
physics="gravity: -10;
debug: false; restitution: 10;">
The gravity is currently set to -10. But I wish to make it equal to the variable x. How might I accomplish this task?