Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
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  
  look down Z  (Read 1264 times)
0 Members and 1 Guest are viewing this topic.
Offline aNt

Senior Devvie


« Posted 2003-12-18 13:44:01 »

hello all. i want to place my view so i am looking down the Z sitting on Z

view.getTransform().lookAt(new Vector3f(0, 0, 1),   new Vector3f(0, 0, 0),    new Vector3f(0, 1, 0));

seems to look down at my object from the top.

just need to get me head around this lookat thing...
Offline shochu

Junior Devvie

Java games rock!

« Reply #1 - Posted 2003-12-18 18:29:55 »

That should be correct. Are you sure you oriented your model correctly?  
Offline aNt

Senior Devvie


« Reply #2 - Posted 2003-12-19 06:59:55 »

humm seems 3dsmax has its xyz mixed up- simple to change  Grin - bink!

thanks for the conformation. thought i was going mad.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #3 - Posted 2003-12-20 20:21:53 »

humm seems 3dsmax has its xyz mixed up- simple to change  Grin - bink!

yep Smiley


Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #4 - Posted 2003-12-23 07:14:10 »

And now it's even easier (this change is currently in CVS).

Those using the getTransformGroupTree simply have to pass the flag AseGeom.TGT_ROTATE90.  Everything is exactaly the same except that the TG you would usually get is rotated 90 degrees and added as a child of a new one which is returned.


Incidentally even if you don't want to use TransformGroupTrees you can still use that method.  Add the returned TG to your scene but only transform the geometry (ie. not the groups).  ie. for this tute:

you would use "BodyGeom" instead of "Body".

Of course don't use the TGT_GROUP_ONLY flag with this!

The reason I say this is that if your group relationships are defined somewhere else (for example in ODE) you don't want to use them in Xith3D.  The pivots are still important however which is why the above methods works nicely Smiley

Those instructions will make there way into an Ase Loader / odejava GSG tutorial early next year.


Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #5 - Posted 2003-12-31 03:11:39 »

I've now added some more code so that you can rotate your model any XYZ amount after loading it.  TGT_ROTATE90 still works to correct the Max->Xith3d issues.  You can now pass a Vector3f into getTransformGroupTree.

I find this useful if for any reason the models I am loading are 90/180 degrees in the wrong direction for whatever reason.

I also did some code cleanup - adding in license and copyrights.  getNamedNodes is deprecated because it uses a combersome Hashtable and doesn't deal with *GROUP's very well.  getNamedNodesMap solves both those issues - please switch to that one before getNamedNodes is deleted totally Smiley


Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

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

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

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

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

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

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

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

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

NoxInc (27 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
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!