mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix(Prediction): child colliders now have the correct layer too
This commit is contained in:
parent
3c3c5c56fd
commit
38129b7696
@ -133,6 +133,11 @@ protected static GameObject CopyRelativeTransform(GameObject source, Transform s
|
||||
child.transform.localPosition = sourceChild.localPosition;
|
||||
child.transform.localRotation = sourceChild.localRotation;
|
||||
child.transform.localScale = sourceChild.localScale;
|
||||
|
||||
// assign the same Layer for the physics copy.
|
||||
// games may use a custom physics collision matrix, layer matters.
|
||||
child.layer = sourceChild.layer;
|
||||
|
||||
return child;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user