Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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 1165 times)
0 Members and 1 Guest are viewing this topic.
Offline aNt

Senior Devvie




AFK


« 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




AFK


« 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 »

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


yep Smiley

Will.

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.


Aside:

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: http://xith.org/tutes/GettingStarted/html/transformgroup_trees_with_t.html

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.

Will.

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

Will.

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

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (46 views)
2014-11-26 15:22:04

toopeicgaming1999 (38 views)
2014-11-26 15:20:36

toopeicgaming1999 (8 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (25 views)
2014-11-25 11:26:43

Gibbo3771 (23 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (75 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org 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‑gaming.org
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!