|
-
May 11th, 2005, 04:20 AM
#1
Thread Starter
Frenzied Member
Centering a viewpoint around an object (2D)
I'm completely stumped on this prolly simple mathematic calculation.
To sum things up:
I got a viewpoint offset called Viewpoint.PosX and I've got an object onscreen with the variables Player.PosX, Player.PosY. Now the Y variables don't matter much in this case.
Both X offsets can go from 1 to 4000.
The limits are that the Viewpoint will not go further then 3200 as 800 is deducated to make sure the viewpoint doesn't go off screen.
What's a good way to center the viewpoint around the object?
Now I'm off to get some well deserved coffee -.-
-
May 11th, 2005, 04:44 AM
#2
Frenzied Member
Re: Centering a viewpoint around an object (2D)
You need to have a play with this code maybe..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|