Isometric Projection

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply
Author
8,033 Rep
Post Options Post Options   Quote Zetar Quote  Post ReplyReply Direct Link To This Post Topic: Isometric Projection
    Posted: 22 Jan 2012 at 3:12am
Lets say I want to make an Isometric "3D" star map that I want to rotate. I want it to appear that all points on this "map" rotate around the y axis as the map turns. This involves Isometric Projection mathematics...

Has anyone worked out how to translate this math into Construct 2 yet?

I was thinking of using the "math" to translate sprite x,y,z (isometric) to x,y (Construct Canvas) as the map rotates. I imagine it would be a complex event structure...

I would probably give a sprite local variable ISOx, ISOy, and ISOz for Isometric point in space, then ProjX, and ProjY for the 2D projection position on the layer.

Then I guess I would have to calculate at what angle the map was facing isometrically, and use that to calculate ISOx, ISOy, and ISOz. Then use Isometric projection to translate the "false" x,y,z to ProjX and ProjY...

Am I on the right track? Anyone want to help me figure this problem out?
Try HEX'N AROUND in the C2 Arcade!
Back to Top
11,725 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jan 2012 at 7:56am
use unity :D
seriously for 3D stuff you're better off using an engine dedicated for that.
There are solution for 2D isometric, r0j0 posted a neat cap some month ago on filmation.
But it's still a pain to use.
If you use a 3D engine you will have less constraint and it might not be that complicated.

Edited by Yann - 22 Jan 2012 at 2:39pm
Back to Top
8,033 Rep
Post Options Post Options   Quote Zetar Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jan 2012 at 2:25pm
- I thought you would say that. Never mind :)
Try HEX'N AROUND in the C2 Arcade!
Back to Top
7,061 Rep
Post Options Post Options   Quote R0J0hound Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jan 2012 at 12:50am
The math isn't too complex:
http://dl.dropbox.com/u/5426011/examples%208/zrotate.capx

If you want it to just rotate relative to the screen remove the "set y" actions.
Back to Top
11,725 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jan 2012 at 5:40am
oh neat :D...
now the "Star map" makes more sens to me :D
Back to Top
8,033 Rep
Post Options Post Options   Quote Zetar Quote  Post ReplyReply Direct Link To This Post Posted: 26 Jan 2012 at 7:43pm
Originally posted by R0J0hound R0J0hound wrote:

The math isn't too complex:
http://dl.dropbox.com/u/5426011/examples%208/zrotate.capx

If you want it to just rotate relative to the screen remove the "set y" actions.


THAT IS EXACTLY WHAT I WANTED!   Very clever. Thanks ROJOhound!
Try HEX'N AROUND in the C2 Arcade!
Back to Top
8,033 Rep
Post Options Post Options   Quote Zetar Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2012 at 12:55am
OK, So now I want to get a Distance value between two stars. I have Local PlotX, PlotY and PlotZ values for each star instance. These are recorded when the star is placed in the Isometric spinning Star map. When you left Click on one star it records the instance and pulls those values. Then you click on a star with the right mouse button and it pulls a second set of coordinates. The Distance Global variable then tallies the distance. But if Global DistanceAB is Negative, it says NaN (because of sqrt I think)...   How can I get that value regardless of whether the value is + or -...

Take a look. It is kinda cool looking... (Think about the cool spinning art you could create with this principle...)

http://www.box.com/s/se75ku9mcgxxa5kevdkl
Try HEX'N AROUND in the C2 Arcade!
Back to Top
4,752 Rep
Post Options Post Options   Quote kataryna Quote  Post ReplyReply Direct Link To This Post Posted: 25 Mar 2012 at 7:33pm
how a nice examples !
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down