|
|
@ -3068,7 +3068,7 @@ function shoot(){ |
|
|
|
shot = setInterval( _ => { |
|
|
|
shot = setInterval( _ => { |
|
|
|
d+=.1; |
|
|
|
d+=.1; |
|
|
|
r.at(d, t); |
|
|
|
r.at(d, t); |
|
|
|
t.y-=.1*(1+d) // simulating gravity and friction |
|
|
|
t.y-=.1*(1+d*d) // simulating gravity and friction |
|
|
|
s.setAttribute("position", AFRAME.utils.coordinates.stringify( t )); |
|
|
|
s.setAttribute("position", AFRAME.utils.coordinates.stringify( t )); |
|
|
|
if (d>100 || t.y < 0) clearInterval(shot) |
|
|
|
if (d>100 || t.y < 0) clearInterval(shot) |
|
|
|
}, 10) |
|
|
|
}, 10) |
|
|
|