Normally, most blocks targeting other sprites will not act on one of the sprite’s clones, but for the parent sprite. Checking if the player has touched an enemy in a game. Checking if a sprite is touching the mouse pointer.In a maze, sensing if a sprite has hit a dead-end.In this example, the wall is moving, and the bullet remains fixed. Having a sprite chase another sprite until the chaser touches the other sprite.Moving a sprite until it touches the edge of the screen. Some common uses for the Touching ()? block: The collision detection data of this block can be finicky and inaccurate with large or moving sprites, particularly when applied to physics engines.īecause this block checks if its sprite is touching another sprite or an edge, it is widely used in detecting collisions. For example, if a sprite's Costume is that of a circle, it will have a circular hitbox when detecting if it is touching other sprites. Weather or not a sprite is touching another depends on weather or not a part of the sprite's visual texture (defined by its Costume) is touching that of another.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |