How to group/attach objects together


#1

How do you attach an object on top of another?
I am trying to make a tank shooter game but I want the body to move with the WASD keys and the nozzle with the position of the cursor so any ideas on how to group them together so if the body moves the nozzle also moves

Thanks!


#3

I think you need “put object around another” http://wiki.compilgames.net/doku.php/gdevelop5/objects/base_object/events#position

then “rotate towards position”:
http://wiki.compilgames.net/doku.php/gdevelop5/objects/base_object/events#angle

…the position to rotate to would be MouseX and MouseY


#4

You can use the link action to link two instances together.
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/linked-objects