|
-
Oct 9th, 2002, 11:50 AM
#1
Thread Starter
Fanatic Member
Inclined Obstacles in Platform
Hello,
how to make platform games and use inclined obstacles???
-
Oct 9th, 2002, 07:45 PM
#2
Good Ol' Platypus
Well, easy. Just use y = mx+b, giving your inclined tile a slope (height of incline / width of incline). Then you can solve for it:
VB Code:
Private Function BaseY(mWidth As Long, mHeight As Long, X As Long)
BaseY = (mHeight / mWidth) * X
End Function
...
...
Chara.Y = BaseY(CurrentBase.Width, CurrentBase.Height, Chara.X)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 10th, 2002, 09:58 AM
#3
Thread Starter
Fanatic Member
Thanx!
But, that formula, how to set the slope to slope to the right/left?
Last edited by petrus; Oct 10th, 2002 at 10:01 AM.
ICQ: 128716725
-
Oct 10th, 2002, 10:15 AM
#4
Good Ol' Platypus
Put in -Width for Left down to Right, and Width for Left up to Right (I think). It may be the other way around.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 10th, 2002, 10:18 AM
#5
Thread Starter
Fanatic Member
Aha, thanx, i thought about something like that, but wasn't sure.
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
|