File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
com.unity.netcode.gameobjects/Runtime/Components Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,12 @@ private void ProcessCollisions()
179179 {
180180 m_HandlerInfo [ contactEventHandler . Key ] = handlerWithInfo . GetContactEventHandlerInfo ( ) ;
181181 }
182+ else
183+ {
184+ var info = m_HandlerInfo [ contactEventHandler . Key ] ;
185+ info . HasContactEventPriority = ! m_RigidbodyMapping [ contactEventHandler . Key ] . isKinematic ;
186+ m_HandlerInfo [ contactEventHandler . Key ] = info ;
187+ }
182188 }
183189
184190 ContactEventHandlerInfo contactEventHandlerInfo0 ;
@@ -235,17 +241,14 @@ private void ProcessCollisions()
235241 }
236242 }
237243
238- if ( preferredContactHandler == null )
244+ if ( preferredContactHandler == null && otherContactHandler != null )
239245 {
240- if ( otherContactHandler != null )
241- {
242- preferredContactHandler = otherContactHandler ;
243- preferredContactHandlerNonRigidbody = otherContactHandlerNonRigidbody ;
244- preferredRigidbody = otherRigidbody ;
245- otherContactHandler = null ;
246- otherContactHandlerNonRigidbody = false ;
247- otherRigidbody = null ;
248- }
246+ preferredContactHandler = otherContactHandler ;
247+ preferredContactHandlerNonRigidbody = otherContactHandlerNonRigidbody ;
248+ preferredRigidbody = otherRigidbody ;
249+ otherContactHandler = null ;
250+ otherContactHandlerNonRigidbody = false ;
251+ otherRigidbody = null ;
249252 }
250253
251254 if ( preferredContactHandler == null || ( preferredContactHandler != null && otherContactHandler == null && ! preferredContactHandlerNonRigidbody ) )
You can’t perform that action at this time.
0 commit comments