drawable groups

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
uSources
Prole
Posts: 4
Joined: Sun Apr 14, 2019 5:42 pm

drawable groups

Post by uSources »

Hello everyone, I would like to know if there is any way to create a like a 'parent object' which allows you to have children drawables objects and move them together. Like a Unity GameObject or Godot Nodes, witch allow to group multiple object and move together

Thanks!!
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: drawable groups

Post by raidho36 »

You can stack transformations, when applied to graphics the effect will be exactly like this. You can retrieve specific transformation at any stage and use it for other calculations such as physics and mouse clicks and whatnot.

Look for Transform class in love.math module.
User avatar
pgimeno
Party member
Posts: 3550
Joined: Sun Oct 18, 2015 2:58 pm

Re: drawable groups

Post by pgimeno »

There's also a scene graph library if you prefer to do things that way. https://love2d.org/forums/viewtopic.php?f=5&t=85947
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 200 guests