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 @@ -122,10 +122,22 @@ pub fn apply_collider_user_changes(
122
122
collider_offset ( entity, & context, & parent_query, & transform_query) ;
123
123
124
124
if let Some ( co) = context. colliders . get_mut ( handle. 0 ) {
125
- co. set_position_wrt_parent ( utils:: transform_to_iso ( & collider_position) ) ;
125
+ let new_pos = utils:: transform_to_iso ( & collider_position) ;
126
+
127
+ if co
128
+ . position_wrt_parent ( )
129
+ . map ( |pos| * pos != new_pos)
130
+ . unwrap_or ( true )
131
+ {
132
+ co. set_position_wrt_parent ( new_pos) ;
133
+ }
126
134
}
127
135
} else if let Some ( co) = context. colliders . get_mut ( handle. 0 ) {
128
- co. set_position ( utils:: transform_to_iso ( & transform. compute_transform ( ) ) )
136
+ let new_pos = utils:: transform_to_iso ( & transform. compute_transform ( ) ) ;
137
+
138
+ if * co. position ( ) != new_pos {
139
+ co. set_position ( utils:: transform_to_iso ( & transform. compute_transform ( ) ) ) ;
140
+ }
129
141
}
130
142
}
131
143
You can’t perform that action at this time.
0 commit comments