Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (653)
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  
  3D Circles  (Read 1352 times)
0 Members and 1 Guest are viewing this topic.
Offline Malohkan

Senior Devvie

while (true) System.out.println("WOO!!!!");

« Posted 2005-07-15 21:47:00 »

I want to be able to draw a circle under any transformation and have it still face the screen.  I can translate the circles anywhere, and rotate the camera, and make the circles face the camera.  My challenge now is that sometimes I rotate the circles about an arbitrary point, which as a result moves the circle from its original location.  Now I don't know what direction the circle is facing.  Is there a way to do a "glLoadRotationIdentity()" or something of the sort so that the current global translation is still in the same place, but the orientation is still in the "identity" direction?  Or is there a better way to figure out what direction I'm facing?

Admin and Game Developer at
Play Rimscape!    |    Play Conquer!
Offline turquoise3232

Junior Devvie

Java (games) rock!

« Reply #1 - Posted 2005-07-15 21:57:35 »

Hi, the fast and easy way to answer I guess : google for "billboards"...
Offline Malohkan

Senior Devvie

while (true) System.out.println("WOO!!!!");

« Reply #2 - Posted 2005-07-15 23:48:00 »

Well after 2 hours of searching and applying, I haven't gotten it yet.  I found this:

and that seemed like it was doing what I want.  It takes the modelview matrix and thus all of the transformations I've done into account.  However, after implementing it my circles are still never facing the scene and I can't make out any pattern to recognize what it's doing wrong.  It's simply all over the place.

I also searched the forums and found some code Tom wrote here:
I tried that, but it didn't take into account the fact that I'm doing multiple transformations AFTER the camera transform.  His code did exactly what mine was doing before, making the circles face the screen assuming the gl(u)LookAt was the only transformation.

Any other ideas for me?  Maybe some other examples that take into account any arbitrary number of transformations after the camera?

Admin and Game Developer at
Play Rimscape!    |    Play Conquer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Malohkan

Senior Devvie

while (true) System.out.println("WOO!!!!");

« Reply #3 - Posted 2005-07-19 16:02:41 »

can I do something like... take the modelview matrix and set 3 of its entries to 0 to get rid of all rotation or something?  Hmm or will that not work?

Admin and Game Developer at
Play Rimscape!    |    Play Conquer!
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

SHC (25 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (40 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (36 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (30 views)
2015-07-24 06:06:53

NoxInc (36 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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!