K
K
Konstantin2020-12-30 17:50:24
pygame
Konstantin, 2020-12-30 17:50:24

How to know the position of an object in pygame?

How to find out the position of an object (image)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iredoff, 2020-12-30
@iredoff

Documentation: www.pygame.org/docs/ref/rect.html
Example:
1) Add object 2) Get coordinates:
image1 = pg.image.load('img/1.png')
object.rect = image1.get_rect()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question