File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,12 @@ AFRAME.registerComponent('force-pushable', {
5959 const force = this . force
6060 const impulseBt = this . impulseBtVector
6161 const pusher = e . detail . cursorEl . object3D
62- pusher . localToWorld ( pusher . position )
63- force . copy ( el . object3D . position . sub ( pusher . position ) )
62+ force . copy ( pusher . position )
63+ pusher . localToWorld ( force )
64+ force . copy ( el . object3D . position . sub ( force ) )
6465 force . normalize ( ) ;
6566
66- // not sure about units, but force seems much stronger with Ammo than Cannon, so scaling down
67- // by a factor of 10.
68- force . multiplyScalar ( this . data . force / 10 ) ;
67+ force . multiplyScalar ( this . data . force ) ;
6968 impulseBt . setValue ( force . x , force . y , force . z )
7069
7170 // use data from intersection to determine point at which to apply impulse.
You can’t perform that action at this time.
0 commit comments