Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (724)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (790)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Rotation Schemes  (Read 1185 times)
0 Members and 1 Guest are viewing this topic.
Offline Mr_Ridd

Senior Newbie

Java games rock!

« Posted 2004-01-19 03:06:21 »


I've got a 3D model that I've imported and it's cool. But now I need to rotate it when I press the relevant arrow key.

I've written some methods to rotate it using glRotatef but it doesn't work perfectly. I need it to be like like a character in Warcraft III. Those characters turn and face what ever position you click. The only difference with mine is that it's keyboard controlled.

What would be the best way to do this?

Offline renanse

Junior Devvie

Intelligence is light to a dark world.

« Reply #1 - Posted 2004-01-19 14:27:25 »

I had some similar problems early on because I didn't understand how the rotate methods worked in relation to the "root."  (ie, rotate rotates around the root versus the center of the object.)

I'm sure I can't put it better than they do in the red book.  I'd suggest checking out Chapter 3, online here:

Renanse  (ruh-NON-say)
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

buddyBro (212 views)
2017-04-05 04:38:00

CopyableCougar4 (642 views)
2017-03-24 16:39:42

theagentd (636 views)
2017-03-24 16:32:08

Rule (686 views)
2017-03-19 13:43:22

Rule (662 views)
2017-03-19 13:42:17

Rule (665 views)
2017-03-19 13:36:21

theagentd (678 views)
2017-03-16 06:07:07

theagentd (611 views)
2017-03-15 23:37:06

theagentd (450 views)
2017-03-15 23:32:18

theagentd (379 views)
2017-03-15 23:31:11
List of Learning Resources
by elect
2017-03-13 15:05:44

List of Learning Resources
by elect
2017-03-13 15:04:45

SF/X Libraries
by philfrei
2017-03-02 09:45:19

SF/X Libraries
by philfrei
2017-03-02 09:44:05

SF/X Libraries
by SkyAphid
2017-03-02 07:38:56

SF/X Libraries
by SkyAphid
2017-03-02 07:38:32

SF/X Libraries
by SkyAphid
2017-03-02 07:38:05

SF/X Libraries
by SkyAphid
2017-03-02 07:37:51 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!