File tree Expand file tree Collapse file tree
fyrox-impl/src/scene/graph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -730,8 +730,6 @@ fn make_heightfield(terrain: &Terrain) -> Option<SharedShape> {
730730 }
731731 let x_scale = terrain. chunk_size ( ) . x * scale. x * col_range as f32 ;
732732 let z_scale = terrain. chunk_size ( ) . y * scale. z * row_range as f32 ;
733- let x_pos = terrain. chunk_size ( ) . x * scale. x * chunk_min. x as f32 ;
734- let z_pos = terrain. chunk_size ( ) . y * scale. z * chunk_min. y as f32 ;
735733 let mut hf = HeightField :: new (
736734 Array2 :: new ( nrows as usize , ncols as usize , data) ,
737735 Vec3 :: new ( x_scale, 1.0 , z_scale) ,
@@ -765,10 +763,7 @@ fn make_heightfield(terrain: &Terrain) -> Option<SharedShape> {
765763 }
766764 // HeightField colliders naturally have their origin at their centers,
767765 // so to position the collider correctly we must add half of the size to x and z.
768- Some ( SharedShape :: compound ( vec ! [ (
769- Pose3 :: translation( x_scale * 0.5 + x_pos, 0.0 , z_scale * 0.5 + z_pos) ,
770- SharedShape :: new( hf) ,
771- ) ] ) )
766+ Some ( SharedShape :: new ( hf) )
772767}
773768
774769// Converts descriptor in a shared shape.
You can’t perform that action at this time.
0 commit comments