You get the motion because x and z are being changed every time and their values are used in the formulas.

Here is the reference I used:

http://www.siggraph.org/education/materials/HyperGraph/modeling/mod_tran/2drota.htm

35 posts
• Page **2** of **4** • 1, **2**, 3, 4

You get the motion because x and z are being changed every time and their values are used in the formulas.

Here is the reference I used:

http://www.siggraph.org/education/materials/HyperGraph/modeling/mod_tran/2drota.htm

Here is the reference I used:

http://www.siggraph.org/education/materials/HyperGraph/modeling/mod_tran/2drota.htm

**Posts:**4,921**Reputation:**49,534

B

84
S

27
G

70
I played around with my original capx and came up with a few adjustments. It will now spawn 3 spherical solar systems at random locations in the window with a y rotational axis, and different rotational speeds. Looks neat...

https://app.box.com/s/1wg9v4gwqel5ligldu0d

https://app.box.com/s/1wg9v4gwqel5ligldu0d

**Posts:**213**Reputation:**10,178

B

192
S

6
G

7
OH ok we're talkin' about the angle of rotation...delta angle... which is a constant... not the total angle.

x is always going to be R*cos(angle) but if we're going from x to x' then it's

the derivative of Rcos(angle) which is cos(angle)^2-Rsin(angle)^2

R*cos(angle)*cos(angle) - R*sin(angle)*sin(angle)

substituting since y=r*sin(angle) we can substitute and get

R*cos(angle)*cos(angle) -y*sin(angle)

and since x = cos(angle) [I'm taking baby steps here]

we can substitute more

x*cos(angle)-y*sin(angle)

BOOM!

x is always going to be R*cos(angle) but if we're going from x to x' then it's

the derivative of Rcos(angle) which is cos(angle)^2-Rsin(angle)^2

R*cos(angle)*cos(angle) - R*sin(angle)*sin(angle)

substituting since y=r*sin(angle) we can substitute and get

R*cos(angle)*cos(angle) -y*sin(angle)

and since x = cos(angle) [I'm taking baby steps here]

we can substitute more

x*cos(angle)-y*sin(angle)

BOOM!

Follow my CZero development on twitter https://twitter.com/CaptainZeroGame

**Posts:**160**Reputation:**7,535

B

53
S

14
G

4
I don't fully get how they come up with the second part either, the derivative... I just looked it up and it's that. There's a proof but phew I'm glad someone else did it.

Follow my CZero development on twitter https://twitter.com/CaptainZeroGame

**Posts:**160**Reputation:**7,535

B

53
S

14
G

4
@R0J0hound

Your reference does not work for Z-Rotation.

Your "isometric Racer" doesn't hit the right Angel "45°"

Search for:

Choosing the correct isometric character facing direction.

What's the best way of transforming a 2D vector into the closest 8-way compass direction?

Isometric graphics in video games and pixel art (wikipedia)

Can you please create a capx for it? ...resulting in these axes following a 26.565° (arctan 0.5) angle to the horizontal.

Example:

I only wanna set a variable like 45° and your event transform it to isometric Z-Rotation and set the playercontrol to this angle.

Your reference does not work for Z-Rotation.

Your "isometric Racer" doesn't hit the right Angel "45°"

Search for:

Choosing the correct isometric character facing direction.

What's the best way of transforming a 2D vector into the closest 8-way compass direction?

Isometric graphics in video games and pixel art (wikipedia)

Can you please create a capx for it? ...resulting in these axes following a 26.565° (arctan 0.5) angle to the horizontal.

Example:

I only wanna set a variable like 45° and your event transform it to isometric Z-Rotation and set the playercontrol to this angle.

Playable games:

http://jamesxxxyz.newgrounds.com/

Newest: Blue and red arrows

Latest update: Blue and red arrows

What you want in C3?

viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists

http://jamesxxxyz.newgrounds.com/

Newest: Blue and red arrows

Latest update: Blue and red arrows

What you want in C3?

viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists

**Posts:**281**Reputation:**1,543

B

11
S

4
@JamesXXXYZ

It does. Since it's using x and z it's rotating around the z axis. Use x and z for y axis rotation, and y and z for x axis rotation.

You can convert an angle to the closest 8 direction with

viewtopic.php?t=65352&start=0

You can convert an angle to an iso projected angle with

angle(0, 0, cos(a), sin(a)/2) where a is an angle.

It does. Since it's using x and z it's rotating around the z axis. Use x and z for y axis rotation, and y and z for x axis rotation.

You can convert an angle to the closest 8 direction with

viewtopic.php?t=65352&start=0

You can convert an angle to an iso projected angle with

angle(0, 0, cos(a), sin(a)/2) where a is an angle.

**Posts:**4,921**Reputation:**49,534

B

84
S

27
G

70
@R0J0hound

Your 8 way example is completly wrong

Your (?) isoracing example miss the right diagonal axis around 3°.

Can you put this in events for game isometric please?

(I only wanna write x°, y°, z°)

The best is to calculate the game in 3D and then simply project it into isometry.

const angle:Number = Math.PI/3;//you may want to tweak this one

const xVec:Point = Point.polar(-Math.PI/2 + angle, 1);

const yVec:Point = Point.polar(-Math.PI/2 - angle, 1);

const zVec:Point = new Point(0, -1);

............................

transform 3D to 2D:

function transform(x:Number, y:Number, z:Number):Point {

return new Point(x*xVec.x + y*yVec.x + z*zVec.x, x*xVec.y + y*yVec.y + z*zVec.y);

}

............................

I uploaded on my Youtube channel two isometric examples, both are in "Real" isometric view.

Is the speed reduction from 0° to 90° linear?

8 Way? No.

Sprites with walk cycle i wanna have 24 Way (min). Without 40 Way (min), I'm thinking about 360 Way. My highest rotation test was by 120 Way.

Your 8 way example is completly wrong

Your (?) isoracing example miss the right diagonal axis around 3°.

Can you put this in events for game isometric please?

(I only wanna write x°, y°, z°)

The best is to calculate the game in 3D and then simply project it into isometry.

const angle:Number = Math.PI/3;//you may want to tweak this one

const xVec:Point = Point.polar(-Math.PI/2 + angle, 1);

const yVec:Point = Point.polar(-Math.PI/2 - angle, 1);

const zVec:Point = new Point(0, -1);

............................

transform 3D to 2D:

function transform(x:Number, y:Number, z:Number):Point {

return new Point(x*xVec.x + y*yVec.x + z*zVec.x, x*xVec.y + y*yVec.y + z*zVec.y);

}

............................

I uploaded on my Youtube channel two isometric examples, both are in "Real" isometric view.

Is the speed reduction from 0° to 90° linear?

8 Way? No.

Sprites with walk cycle i wanna have 24 Way (min). Without 40 Way (min), I'm thinking about 360 Way. My highest rotation test was by 120 Way.

You do not have the required permissions to view the files attached to this post.

Playable games:

http://jamesxxxyz.newgrounds.com/

Newest: Blue and red arrows

Latest update: Blue and red arrows

What you want in C3?

viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists

http://jamesxxxyz.newgrounds.com/

Newest: Blue and red arrows

Latest update: Blue and red arrows

What you want in C3?

viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists

**Posts:**281**Reputation:**1,543

B

11
S

4
So the 8 direction capx doesn't work right for isometric. I can see that, which isn't a problem since it wasn't made with isometric in mind.

So the problem becomes how to find the closest angle as in your image. There probably can be an elegant formula to do it nicely, but barring deriving that you can check against all those angles to see if it's close.

But wouldn't it be simpler to do all the motions from a top view and set all the visible stuff to an isometric projection? Then the 8 direction capx is perfectly applicable. I doesn't matter that 45 is an animation drawn at 22.5 degrees, because when the angle of motion is changed from to view to iso it will be 22.5.

So the problem becomes how to find the closest angle as in your image. There probably can be an elegant formula to do it nicely, but barring deriving that you can check against all those angles to see if it's close.

But wouldn't it be simpler to do all the motions from a top view and set all the visible stuff to an isometric projection? Then the 8 direction capx is perfectly applicable. I doesn't matter that 45 is an animation drawn at 22.5 degrees, because when the angle of motion is changed from to view to iso it will be 22.5.

**Posts:**4,921**Reputation:**49,534

B

84
S

27
G

70
@R0J0hound

I guess it doesn't work (I saw other examples of isometric view[Construct 2]). Problem is that isometric rotation is not linear. I don't know if the iso pathfinding demo has correct rotation and speed. I guess every example which content sin and cos aren't real iso projection. I have no problem to render things out in isometric view. Use my example 24 Way picture and load it to your 8 Way example. I don't really understand the theory behind isometric and i'm not a programmer.

I guess it doesn't work (I saw other examples of isometric view[Construct 2]). Problem is that isometric rotation is not linear. I don't know if the iso pathfinding demo has correct rotation and speed. I guess every example which content sin and cos aren't real iso projection. I have no problem to render things out in isometric view. Use my example 24 Way picture and load it to your 8 Way example. I don't really understand the theory behind isometric and i'm not a programmer.

Playable games:

http://jamesxxxyz.newgrounds.com/

Newest: Blue and red arrows

Latest update: Blue and red arrows

What you want in C3?

viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists

http://jamesxxxyz.newgrounds.com/

Newest: Blue and red arrows

Latest update: Blue and red arrows

What you want in C3?

viewtopic.php?f=146&t=122050

Youtube: https://www.youtube.com/channel/UCLE7Ml ... /playlists

**Posts:**281**Reputation:**1,543

B

11
S

4
35 posts
• Page **2** of **4** • 1, **2**, 3, 4

## Who is online |

Users browsing this forum: No registered users and 2 guests |