File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed 
cave-game/server/entities Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -190,9 +190,13 @@ export class PlayerEntity extends Entity {
190190	lastFoundAnchor : GrappleAnchorEntity  |  null  =  null ; 
191191	lastAnchor : GrappleAnchorEntity  |  null  =  null ; 
192192	findGrappleAnchor ( lookDir : YXZEuler ) : GrappleAnchorEntity  |  null  { 
193- 		const  dir  =  new  phys . Vec3 ( - Math . sin ( lookDir . y ) ,  Math . sin ( lookDir . x ) ,  - Math . cos ( lookDir . y ) ) . unit ( ) ; 
193+ 		const  dir  =  new  phys . Vec3 ( 
194+ 			- Math . sin ( lookDir . y )  *  Math . cos ( lookDir . x ) , 
195+ 			Math . sin ( lookDir . x ) , 
196+ 			- Math . cos ( lookDir . y )  *  Math . cos ( lookDir . x ) , 
197+ 		) ; 
194198		const  objects  =  this . game . raycast ( 
195- 			this . body . position . vadd ( dir . clone ( ) . scale ( 2 ) ) ,  // start the ray 2 units in front of the player 
199+ 			this . body . position ,   // .vadd(dir.clone().scale(2)), // start the ray 2 units in front of the player
196200			dir . scale ( 100 ) . vadd ( this . body . position ) , 
197201			{ } , 
198202			this , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments