Isometric Projection

Get help using Construct 2

Post » 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
191
S
5
G
7
Posts: 212
Reputation: 9,993

Post » 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
46
S
20
G
13
Posts: 1,405
Reputation: 14,993

Post » Sun Jan 22, 2012 2:25 pm

- I thought you would say that. Never mind :)
B
191
S
5
G
7
Posts: 212
Reputation: 9,993

Post » 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
36
S
3
G
6
Posts: 2,164
Reputation: 8,596

Post » Mon Jan 23, 2012 5:40 am

oh neat :D...
now the "Star map" makes more sens to me :D
B
46
S
20
G
13
Posts: 1,405
Reputation: 14,993

Post » 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
191
S
5
G
7
Posts: 212
Reputation: 9,993

Post » 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
191
S
5
G
7
Posts: 212
Reputation: 9,993

Post » Sun Mar 25, 2012 7:33 pm

how a nice examples !
B
170
S
2
G
2
Posts: 65
Reputation: 5,902

Post » Mon Dec 02, 2013 12:10 pm

Zetar that is wow man thanks
B
54
S
5
G
3
Posts: 181
Reputation: 10,862

Post » 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
10
S
2
G
3
Posts: 66
Reputation: 3,380

Next

Return to How do I....?

Who is online

Users browsing this forum: darkagent, kodisz and 2 guests