Python Forum
How to make an image move in relation to another in PYGAME
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make an image move in relation to another in PYGAME
#2
Set the tiller offset to a fixed point off the boat. Then move the boat around. This can be done by creating a boat class. Which will make it a lot easier to pass data back and forth.

Psuedocode...
boat_rect = boatimage.get_rect()
Tillerrect = boat_rect.center() #modify center to specific locations
Move boat_rect coordinates and the tiller will move too
Recommended Tutorials:
Reply


Messages In This Thread
RE: How to make an image move in relation to another in PYGAME - by metulburr - Nov-10-2021, 03:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [PyGame] my pygame car wont move Erio85 1 1,160 Apr-24-2023, 04:52 PM
Last Post: Erio85
  [PyGame] pygame-manu : using controller buttons to move around menu mlw19mlw91 2 1,725 Mar-12-2023, 01:55 PM
Last Post: deanhystad
  Pygame Zero - no actor image toiling_away 2 1,929 Oct-14-2022, 12:16 AM
Last Post: toiling_away
  How to make enemy chase me in pygame? Jan_97 3 4,617 Nov-23-2021, 05:08 PM
Last Post: Jan_97
  cant make a door automatically close a few seconds after i open it in pygame cooImanreebro 2 2,315 Dec-15-2020, 08:40 PM
Last Post: michael1789
  Getting a ship to move in pygame djwilson0495 2 3,730 Dec-09-2020, 11:03 AM
Last Post: djwilson0495
  [PyGame] how to make objects move at a precise amount of time? Zhaleh 2 2,707 Aug-02-2020, 02:52 PM
Last Post: Zhaleh
  Trying to make boundries for the pygame bluewing101 2 2,107 Mar-23-2020, 01:35 AM
Last Post: Windspar
  open cv ->pygame: turn image into location Gamedeveloper 1 2,130 Jan-20-2020, 05:00 PM
Last Post: michael1789
  How can I make all of the background move as opposed to just one platform? HelpMEE 6 3,036 Dec-28-2019, 11:04 PM
Last Post: HelpMEE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020