Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


NPS

Member Since 13 Nov 2009
Offline Last Active Aug 17 2012 09:22 AM

Posts I've Made

In Topic: Best way to make and render an animation in the mobile game?

28 July 2012 - 09:29 AM

'least common denominator' codec

Any suggestions then?

In Topic: Best way to make and render an animation in the mobile game?

25 July 2012 - 04:17 PM

Yeah, the coded-thing is the problem. We've already come across big problems with audio playback due to codec-issues. Theoretically it works and practically not always. :P So we'd like to use a reliable method, if possible.

In Topic: How to rotate about global axes?

14 November 2009 - 08:36 AM

The nice thing is I've implemented some kind of rotations queue. It was before I found out about the described problem. But when I got my solution I just changed changed the code so that it performed rotations from the last one to the first. So I didn't even have to change much. And it works nicely.

But still, can you describe your idea? I'm just curious. How do you want to create your array?

In Topic: How to rotate about global axes?

14 November 2009 - 02:44 AM

I figured it out. To rotate about local axes call glRotate in order you want to rotate. To rotate about global axes call glRotate backwards - last rotation goes first, first goes last.

Example:

You want to rotate object about local axes:
1) about X axis
2) about Y axis
3) about Z axis
Write:
1) glRotate(angle, 1.0, 0.0, 0.0);
2) glRotate(angle, 0.0, 1.0, 0.0);
3) glRotate(angle, 0.0, 0.0, 1.0);

You want to rotate object about global axes:
1) about X axis
2) about Y axis
3) about Z axis
Write:
1) glRotate(angle, 0.0, 0.0, 1.0);
2) glRotate(angle, 0.0, 1.0, 0.0);
3) glRotate(angle, 1.0, 0.0, 0.0);

jyk, I don't get your idea on creating the array (I'm just saying as I've solved the problem).

In Topic: How to rotate about global axes?

13 November 2009 - 09:41 PM

That sounds like an idea. It has its advantages. Although, when implemented it would look like a big monster with a lot of switches and cases. Should work but I'm not sure if it could be called "A good style of programming" and if it's a good way to do it.

Anyway, it's an option and thank you for that.

PARTNERS