aframe-physics-system
aframe-physics-system copied to clipboard
Add some utility components
force="1 0 0"proximity-force="maxDistance: 2;"(allow things to hover, or push away from others?)rotation-constraint="y"(limit rotation toyaxis)position-constraint="x, z"(limit movement toxandzaxes)
constant-force="1 0 0"
multiplies a random force of RAND * (1 1 1) * random-force when near object of class foo
random-force="force: 0, 5, 0; distance: 3; class: .foo"
same as random-force but only once, useful for explosions and scattering
random-impulse="force: 2 10 2, ..."
ray sets direction and distance of raycast, if hit then apply force
repel-force="ray: 0 -2 0; force: 0, 3, 0"
Using them with a mixin or a class ( e.g. ".hovering" ) would be interesting.
+1 for the position-constraint, or even axis for something like the distance constraint.