Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix points getting removed and empty points warning. #283

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.8.8

- Fix points getting removed and empty points warning.

## v0.8.7

- Update state reload test. Also add gdlint to ghactions step.
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/rapier_wrapper/shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl PhysicsEngine {
handle: ShapeHandle,
) {
let points_vec = point_array_to_vec(points);
if let Some(shape_data) = SharedShape::convex_polyline(points_vec) {
if let Some(shape_data) = SharedShape::convex_polyline_from_points_raw(points_vec) {
self.insert_shape(shape_data, handle)
}
}
Expand Down
8 changes: 0 additions & 8 deletions src/shapes/rapier_concave_polygon_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ impl IRapierShape for RapierConcavePolygonShape {
&& let Ok(arr) = points.try_to::<PackedVector3Array>()
{
let len = arr.len();
if len == 0 {
godot_error!("ConcavePolygon3D must have at least one face");
return;
}
if len % 3 != 0 {
godot_error!("ConcavePolygon3D must have a multiple of 3 number of points");
return;
Expand All @@ -96,10 +92,6 @@ impl IRapierShape for RapierConcavePolygonShape {
VariantType::PACKED_VECTOR2_ARRAY => {
if let Ok(arr) = data.try_to::<PackedVector2Array>() {
let len = arr.len();
if len == 0 {
godot_error!("ConcavePolygon2D must have at least two points");
return;
}
if len % 2 != 0 {
godot_error!("ConcavePolygon2D must have an even number of points");
return;
Expand Down
Loading