dimforge / dimforge/bevy_rapier
Bug with scaling Transform with RigitBody::Dynamic with collider::ball
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Description

### **Same issue**
#329
### **Error**
`
2023-03-05T22:13:44.771773Z ERROR bevy_rapier2d::geometry::shape_views::collider_view: Failed to apply scale [NaN, NaN] to Ball shape.
`
### **Dependencies**
- bevy = "0.9.0"
- bevy_rapier2d = "0.20.0"
# To Reproduce
`
use bevy::prelude::*;
use bevy_rapier2d::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(RapierPhysicsPlugin::::pixels_per_meter(100.0))
.add_plugin(RapierDebugRenderPlugin::default())
.add_startup_system(setup)
.run();
}
fn setup(
mut commands: Commands,
) {
commands.spawn(RigidBody::Dynamic)
.insert(Collider::ball(50.0))
.insert(
SpriteBundle {
transform: Transform::default().with_scale(Vec3::new(0.3, 0.3, 0.0)),
..default()}
);
}
`
### **Description**
Ran into this error while developing my game and made a minimal example to reproduce the same error.
With adding a texture to the Sprite Bundle, still have the same error (i removed texture to shorten an example)
With replacing Transform::default().with_scale(Vec3::new(0.3, 0.3, 0.0)) with
Transform::default()
error goes away.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.