Leandro Lorenzet Dihl - Informatica wrote: > I am using the original Sun loader > (com.sun.j3d.loaders.vrml97.VrmlLoader;), to create a game. How I must > treat the collision not to walk through objects?
I'm going to add a bit more detail to Alan's reply. Strictly speaking, neither loader directly gives you collision avoidance (the correct term for not letting you walk through objects). A loader parses a file in and then gives you a collection of geometry and behaviours. What your application does with it after that, is a separate issue. Collision avoidance is about detecting where the user wants to go and then what objects they are going to run into. A loader does not give you the first - controlling of the user. That's the part where your application implements a Java3D Behaviour for keyboard or mouse events which you then use to move the ViewPlatform about. Collision avoidance then works in combination with the geometry that the loader produced. As you should be able to see, it doesn't matter which loader you use, you will always walk through objects. However..... There are always exceptions to the rules. :) The Xj3D V2 loader does provide some collision handling by default. What that means though, is that you *must* use our navigation code to do that. We use a combination internally that will provide what you want (with the exception of a few bugs that currently exist). As you are implementing a game, that's probably not what you want, so you will have to do it all yourself anyway. -- Justin Couch http://www.vlc.com.au/~justin/ Freelance Java Consultant http://www.yumetech.com/ Author, Java 3D FAQ Maintainer http://www.j3d.org/ ------------------------------------------------------------------- "Humanism is dead. Animals think, feel; so do machines now. Neither man nor woman is the measure of all things. Every organism processes data according to its domain, its environment; you, with all your brains, would be useless in a mouse's universe..." - Greg Bear, Slant ------------------------------------------------------------------- =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".