Different View Follow?

Talk about making games.

Different View Follow?

Postby Hedfone » Sun Aug 20, 2006 9:11 pm

can i make the view follow my actor only on the 'x' axis?
I know i can do this using the CenterView actor but i don't really want to if there's another way.
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby DilloDude » Mon Aug 21, 2006 3:03 am

Try
Code: Select all
view.x = player.x - (view.width / 2);

This will keep the view centered on the player, but only on the x axis.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Hedfone » Mon Aug 21, 2006 3:47 pm

should I use this on a Create Actor event or a Draw Actor event?
User avatar
Hedfone
 
Posts: 174
Joined: Mon Jul 31, 2006 9:47 pm
Score: 2 Give a positive score

Postby DilloDude » Thu Aug 24, 2006 4:15 am

draw actor
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron