File tree Expand file tree Collapse file tree
common/src/main/rust/rapier/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ pub fn tick(scene_id: jint) {
7272 let local_anchor_1 = joint. pos_a
7373 - joint
7474 . id_a
75- . and_then ( |id | scene. level_colliders . get ( & id ) )
76- . and_then ( |rb| rb . center_of_mass )
75+ . and_then ( |v | scene. level_colliders . get ( & v ) )
76+ . map ( |v| v . center_of_mass . unwrap ( ) )
7777 . unwrap_or_default ( ) ;
7878 impulse_joint. data . set_local_anchor1 ( Vector :: new (
7979 local_anchor_1. x as Real ,
@@ -90,8 +90,8 @@ pub fn tick(scene_id: jint) {
9090 let local_anchor_2 = joint. pos_b
9191 - joint
9292 . id_b
93- . and_then ( |id | scene. level_colliders . get ( & id ) )
94- . and_then ( |rb| rb . center_of_mass )
93+ . and_then ( |v | scene. level_colliders . get ( & v ) )
94+ . map ( |v| v . center_of_mass . unwrap ( ) )
9595 . unwrap_or_default ( ) ;
9696 impulse_joint. data . set_local_anchor2 ( Vector :: new (
9797 local_anchor_2. x as Real ,
You can’t perform that action at this time.
0 commit comments