Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 2D heightfield scale and docs (#343)
# Objective Fixes #342. The 2D heightfield only has a scalar `scale` argument instead of allowing different scaling along each coordinate axis. The docs are also incorrect. ## Solution Take a `Vec2` instead of a scalar value for the 2D `Collider::heightfield` and fix the heightfield docs. --- ## Migration Guide The 2D `Collider::heightfield` method now takes a `Vec2` scale instead of a single float. This way, it now supports non-uniform scaling. ```rust // Before let collider = Collider::heightfield(heights, 2.0); // After let collider = Collider::heightfield(heights, Vec2::new(2.0, 2.0)); ```
- Loading branch information