How to add a Transform to a Collider? #441
Unanswered
erwanvivien
asked this question in
Q&A
Replies: 3 comments
-
Without transformWith Scale (1/10x)With translate (5m)With rotate (45°) |
Beta Was this translation helpful? Give feedback.
0 replies
-
It seems you're missing a GlobalTransform: parent.spawn((
Collider::cuboid(2.5f32, 2.5f32, 2.5f32),
// I recommend testing with bigger scale so you can see the debug drawing.
Transform::from_scale(Vec3::splat(1.1f32)),
// I prefer `SpatialBundle::from_transform(Transform::from_scale(Vec3::splat(1.1f32)))`, but that's slightly out of scope for this question.
GlobalTransform::default(),
));
```rs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is the basic code I'm trying to use :
And it seems like only the scale Transforms doesn't apply?
Beta Was this translation helpful? Give feedback.
All reactions