You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial/src/65-sprite-collider.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Rusty Engine has an basic collision system. You may define one convex polygon shape to be a collider for a sprite. When two sprites with colliders whose `collision` fields are both set to `true` begin or end overlapping, a [`CollisionEvent`](https://docs.rs/rusty_engine/latest/rusty_engine/physics/struct.CollisionEvent.html) will be produced. If either of the sprites lacks a collider, or if either of the sprites has their `collision` field set to `false`, then no collision event is produced.
4
4
5
-
Colliders will be rendered as lines on the screen if `Engine.debug_sprite_colliders` is set to `true`.
5
+
Colliders will be rendered as lines on the screen if `Engine.show_colliders` is set to `true`.
6
6
7
7
Colliders are stored in files with the same name and path as the image file they are for, but with the `.collider` extension. If a valid collider file exists when a sprite is created, it will be loaded automatically. However, the `collision` field for a sprite always defaults to `false`, so you must opt in to the collision system by setting `collision` to `true` on your sprites.
0 commit comments