File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,22 @@ pub fn apply_collider_user_changes(
159
159
) ;
160
160
161
161
if let Some ( co) = context_colliders. colliders . get_mut ( handle. 0 ) {
162
- co. set_position_wrt_parent ( utils:: transform_to_iso ( & collider_position) ) ;
162
+ let new_pos = utils:: transform_to_iso ( & collider_position) ;
163
+
164
+ if co
165
+ . position_wrt_parent ( )
166
+ . map ( |pos| * pos != new_pos)
167
+ . unwrap_or ( true )
168
+ {
169
+ co. set_position_wrt_parent ( new_pos) ;
170
+ }
163
171
}
164
172
} else if let Some ( co) = context_colliders. colliders . get_mut ( handle. 0 ) {
165
- co. set_position ( utils:: transform_to_iso ( & transform. compute_transform ( ) ) )
173
+ let new_pos = utils:: transform_to_iso ( & transform. compute_transform ( ) ) ;
174
+
175
+ if * co. position ( ) != new_pos {
176
+ co. set_position ( utils:: transform_to_iso ( & transform. compute_transform ( ) ) ) ;
177
+ }
166
178
}
167
179
}
168
180
You can’t perform that action at this time.
0 commit comments