Fix body collisions with static objects
This commit is contained in:
		
							parent
							
								
									550cc04519
								
							
						
					
					
						commit
						513092ca16
					
				@ -19,9 +19,9 @@ namespace Passer.Humanoid {
 | 
				
			|||||||
            // static colliders
 | 
					            // static colliders
 | 
				
			||||||
            if (rigidbody == null)
 | 
					            if (rigidbody == null)
 | 
				
			||||||
                humanoid.triggerEntered = true;
 | 
					                humanoid.triggerEntered = true;
 | 
				
			||||||
            else
 | 
					
 | 
				
			||||||
            if (!otherCollider.isTrigger && !humanoid.IsMyRigidbody(rigidbody)
 | 
					            if (!otherCollider.isTrigger && !humanoid.IsMyRigidbody(rigidbody)
 | 
				
			||||||
                && !rigidbody.transform.IsChildOf(humanoid.transform)
 | 
					                && (rigidbody == null || !rigidbody.transform.IsChildOf(humanoid.transform))
 | 
				
			||||||
                ) {
 | 
					                ) {
 | 
				
			||||||
                Vector3 worldVelocity = humanoid.headTarget.neck.target.transform.TransformDirection(humanoid.velocity);
 | 
					                Vector3 worldVelocity = humanoid.headTarget.neck.target.transform.TransformDirection(humanoid.velocity);
 | 
				
			||||||
                worldVelocity += humanoid.targetVelocity;
 | 
					                worldVelocity += humanoid.targetVelocity;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user