Calculate Space In Pixels Between Two Sprites?

Hi,

Been using current GDevelop 5 on Windows 11 for a couple of days.
Making a “Flappy Bird” styled video game to start with.

How would I calculate the space in pixels between two sprites?
Please see attached screenshot.
Need to know the space in pixels between the two red brick walls.

Let me know, thanks!

Jesse

Hey, you can use bounding box position expression for this.

distance = Wall_Bot.BoundingBoxTop() - Wall_Top.BoundingBoxBottom()

That worked, thank you!