[libgdx] Moving a group of sprites

Say I have a group with a number of sprites in it that are doing their thing. They are moving in specified directions, moving in random directions, etc. Now I want to move this group of sprites uniformly to the right, while they are still doing their thing. Sadly, I’m not using a Box2D group so I can’t use applyTransform(). How can I achieve this?

Hi

Without seeing any code samples, I would suggest loop through the sprites and update their position. Again, I would have to see some more code to give further suggestions.

CopyableCougar4

Looping through the sprites would work, but thinking ahead, I want to apply more transformations (rotation, scale, etc)
I think I got myself on the right track though.

I’m playing around with the Matrix3 object. I’m a little new to matrices, so naturally I’m stumped at something.
Basically, I’m tweening the position of my group using the tween engine. Say I move the group from 10,10 to 500,500. The tween engine goes through the specified range and sets new values as per delta. Now, I can’t use these values for the matrix (I tried). Matrix.translate() seems to add or multiply the new values to the existing ones, pushing the matrix way out of sight. Instead, I just need to add the difference between old values and new values to the matrix. Eventually, I want to multiply my sprites’ position vectors by the matrix and then they will move with the group. I’m not very familiar with all the matrix functions, so I wanted to ask if there was a method that would suit my purpose? Or am I overcomplicating things?

I might have gotten something wrong but I feel it’s a easy job that is being made complex. It’s because I really do not know how your gameplay is or what your code looks like.

Say you have a class that represents your sprite thing (A monster? Alien?). You should have state of your object in a given time. State can be Roll, Move_Left, Move_Right, Aim, Shoot, RollAndMoveLeft, Move_Left_Shoot, etc. You should have some properties that tell the sprite its next destination for movement. Depending on the state, your sprite’s update method should update the sprites accordingly.