|
This is a single graph engine used to move characthers in a single 2D enviroment to look like it is 3D. Made with my friend in VB.NET
| CODE | Dim p1, p2 As Point Dim x, z, b, i, y, x2 As Single
Mouseclick sub
p1.X = picturebox.Left p1.Y = picturebox.Top z = p2.X - p1.X b = p2.Y - p1.Y x = 0 y = p1.Y x2 = p1.X i = 0 Do If z < 0 Then x = x - 1 i = (x * B) / Math.Abs(z) p1.X = Math.Abs(x) - x2 p1.Y = y - i Else x = x + 1 i = (x * B) / z p1.X = x + x2 p1.Y = y + i End If picturebox.Left = Math.Abs(p1.X) picturebox.Top = p1.Y Loop Until x = z p1.X = p2.X p1.Y = p2.Y
Mousemove sub
p2.X = e.X p2.Y = e.Y
|
------------------------------------------------------------------ Thats all. Dont forget to put the imagebox to right place, and dont forget to change its name, or change inside the code. It still have some (pretty strange) problem, if you find any solution, pls post it  Thx
--------------------
A nobleman, looking for some meaning of life (and a horse and a flaming sword off course)
So big question of life: Are there life before the death?
|