# Isometric Projection

Get help using Construct 2

### » Sun Jan 22, 2012 3:12 am

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?
B
193
S
6
G
7
Posts: 213
Reputation: 10,203

### » Sun Jan 22, 2012 7:56 am

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.Yann2012-01-22 14:39:52
B
68
S
22
G
14
Posts: 1,486
Reputation: 16,565

### » Sun Jan 22, 2012 2:25 pm

- I thought you would say that. Never mind :)
B
193
S
6
G
7
Posts: 213
Reputation: 10,203

### » Mon Jan 23, 2012 12:50 am

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.
B
94
S
33
G
124
Posts: 5,458
Reputation: 79,479

### » Mon Jan 23, 2012 5:40 am

oh neat :D...
now the "Star map" makes more sens to me :D
B
68
S
22
G
14
Posts: 1,486
Reputation: 16,565

### » Thu Jan 26, 2012 7:43 pm

[QUOTE=R0J0hound] 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.[/QUOTE]

THAT IS EXACTLY WHAT I WANTED!   Very clever. Thanks ROJOhound!
B
193
S
6
G
7
Posts: 213
Reputation: 10,203

### » Fri Jan 27, 2012 12:55 am

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
B
193
S
6
G
7
Posts: 213
Reputation: 10,203

### » Sun Mar 25, 2012 7:33 pm

how a nice examples !
B
170
S
3
G
2
Posts: 65
Reputation: 6,057

### » Mon Dec 02, 2013 12:10 pm

Zetar that is wow man thanks
B
262
S
46
G
15
Posts: 2,000
Reputation: 41,919

### » Fri Jan 17, 2014 4:22 pm

zrotate.capx doesn't make sense to me... how does getting the sin and cos of 1 over and over get you angular motion? Shouldn't it be the sin and cos of an increasing angle?... but when you change that constant it just changes the speed of the rotation. Does cos(1) not work like I think it does? Shouldn't it return 1 all the time?
B
66
S
17
G
5
Posts: 174
Reputation: 8,500

Next