File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,14 +56,20 @@ var CollisionInfo = {
5656
5757 share = overlapY * 0.5 ;
5858
59- share1 = body1 . getMoveY ( share ) ;
59+ if ( ! body1 . immovable )
60+ {
61+ share1 = body1 . getMoveY ( share ) ;
62+ }
6063
6164 if ( share1 < share )
6265 {
6366 share += ( share - share1 ) ;
6467 }
65-
66- share2 = body2 . getMoveY ( - share ) ;
68+
69+ if ( ! body2 . immovable )
70+ {
71+ share2 = body2 . getMoveY ( - share ) ;
72+ }
6773 }
6874 else
6975 {
@@ -81,14 +87,20 @@ var CollisionInfo = {
8187
8288 share = overlapY * 0.5 ;
8389
84- share2 = body2 . getMoveY ( share ) ;
90+ if ( ! body2 . immovable )
91+ {
92+ share2 = body2 . getMoveY ( share ) ;
93+ }
8594
8695 if ( share2 < share )
8796 {
8897 share += ( share - share2 ) ;
8998 }
9099
91- share1 = body1 . getMoveY ( - share ) ;
100+ if ( ! body1 . immovable )
101+ {
102+ share1 = body1 . getMoveY ( - share ) ;
103+ }
92104 }
93105 else
94106 {
You can’t perform that action at this time.
0 commit comments