Page 1 of 1

View Actor Problems Pleas Read! (reacently modified)

PostPosted: Sun Sep 23, 2012 6:24 pm
by Turon
How do you make the view follow the actor in both x and y axis's. I have been using methods of making the view follow the actor but I cant making the view follow the player on the Y axis at the same time as it follows on the X axis.
Do Youknow how to make the view follow the player on the x and y axis without using follow actor?

Re: View Actor Problems Pleas Read! (reacently modified)

PostPosted: Thu Sep 27, 2012 11:28 pm
by Soullem
There are many ways to do this, the simplest being to parent the actor to the view. This will lock the player in the center of the screen(or wherever he is relative to the view.)

If you want the view to follow the player with some wiggle room you will need some coding.
There are other ways to do this, but I will do a simple way.

1.) Create 4 wire frame actors named moveview up down left and right, and parent them to the player.
2) To make this really simple you can set up a collision event for each one, and for each one write the code to move the screen.
Code: Select all
//for the right
view.x+=10;

//for the left
view.x-=10;

// for up
view.y-=10;

// and down
view.y+=10;



You must position the frames to be a square with open corners like this


Hope this helps

Re: View Actor Problems Pleas Read! (reacently modified)

PostPosted: Sun Sep 30, 2012 9:17 am
by Turon
Hey thanks a lot! I saw wireframe actors in the Caveman demo that came with Game Editor but I could not understand their use.

Re: View Actor Problems Pleas Read! (reacently modified)

PostPosted: Wed Oct 03, 2012 11:49 pm
by Soullem
thanks... Hope this method works for you.

Glad I could be of service

Re: View Actor Problems Pleas Read! (reacently modified)

PostPosted: Mon Jan 07, 2013 6:13 pm
by arcreamer
How would this work if the wireframe regions are parented to the player? Then they would stay the same distance away from the player at all times, and make it impossible for the player to collide into them. I'm trying to do this as well, but thats whats happening

Re: View Actor Problems Pleas Read! (reacently modified)

PostPosted: Mon Jan 07, 2013 6:29 pm
by skydereign
The reason you use the wireframes is so you don't need to parent the view to the player. These are two different methods for view control, you can't combine the two. So if you want to use wireframes instead, you should unparent the view from the player.