The view is like an actor. You can use view.x and view.y to change the position of the view. If your actor's name is myactor, you could use this code in the draw event of the view:
- Code: Select all
// BAD CODE!!!
x = myactor.x;
y = myactor.y;
The problem is now, that the actor isn't in the center of the view, it is in the upper left corner of the view. To bring it in the center, you should know the width and height of the view (I think you can use the variables width and height).
You can finally use this code:
- Code: Select all
// use this in draw event of view
x = myactor.x-width/2;
y = myactor.y-height/2;
I hope that helps you.