Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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  
  collisions  (Read 1109 times)
0 Members and 1 Guest are viewing this topic.
Offline xema23

Junior Newbie





« Posted 2005-10-19 14:24:10 »

Hi!!

I´m from Spain, sorry for my english. I´m finishing my studies and I´m making my final project. I´m building an interface for a librarian robot. This interface has a 3d image of a virtual robot maked with java3d. Now I can move the robot but I need more information about the collisions. I´m searching a code example of  collisions to know how to use the functions that appear in java 3d. I need to know how to use them, thanks

Xema
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2005-10-19 21:51:35 »

Java3D collision dtection cannot be used for simulation of two physica; objects colliding because you do not get the information on the collision until some tiem AFTER the interpenetration has been rendered.  It notifies you that a collision has ocurred some tiem in the past, but not necessarily exactly  on the frame that collision first occurs.

For this kind of collision detection (sometimes called collision avoidance) you have three choices:
(1) Use pick rays to shoot out ahead of your object in the movement direction, find the maximal distance the objectcan travel before it collides with the environment, and clip your motion to match.

(2) Use the Java bindinsg to ODE to do your collision detection.

(3) Implement a real per-frame game style collision system from the ground up in Java.

#1 is really only suitable for simple "toy" problems but might be enough for you.

#2 is a fair bit of work, requires you use a native library, and adds a lot of memory overhead because ODE is a native lib with JNI bindings and it keeps its own representation of the workld that you have to keep synchronized with the J3D scene graph.

#3 requires you know a fair bit about collision detection algorithms.  Shawn Kendall at IMI is currently writing a Java3D integrated physics library.  When done it should be the easiest path to this rto of thing but hes still in Alpha on it.  (Im using it in a project of mine as an Alpha tester.)


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Mike Jacobs

Junior Member





« Reply #2 - Posted 2005-10-19 22:25:12 »

Shawn Kendall at IMI is currently writing a Java3D integrated physics library.  When done it should be the easiest path to this rto of thing but hes still in Alpha on it.  (Im using it in a project of mine as an Alpha tester.)

What aspect of physics simulation is planned for the IMI project? 

I classify physics engine features very broadly as (in increasing complexity):
1. collision avoidance
2. collision detection and response (contrained motion)
3. resting contact (contrained motion with stacking of objects)
4. joints (constrainted contact)
5. foward kinematics
6. reverse kinematics

For what it's worth, Genesis FX currently has level 2 partially complete (interparticle collisions and resting contact coming in v1.1).

Mike

Special Effects for Java 3D games: http://www.indietechnologies.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline xema23

Junior Newbie





« Reply #3 - Posted 2005-10-20 15:56:59 »

sorry,

Then, I can´t use the existent class behavior in java to solve the colisions of the robot with the other items of the library?
Offline Mike Jacobs

Junior Member





« Reply #4 - Posted 2005-10-20 22:03:40 »

I can´t use the existent class behavior in java to solve the colisions of the robot with the other items of the library?

You can use the Java3D collision support, but your robot may penetrate other objects.  The other option is to use ODE (see the Game Physics forum) or build your own collision detection and response system.

Mike

Special Effects for Java 3D games: http://www.indietechnologies.com
Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2005-10-24 01:07:15 »

Shawn Kendall at IMI is currently writing a Java3D integrated physics library.  When done it should be the easiest path to this rto of thing but hes still in Alpha on it.  (Im using it in a project of mine as an Alpha tester.)

What aspect of physics simulation is planned for the IMI project? 

I classify physics engine features very broadly as (in increasing complexity):
1. collision avoidance
2. collision detection and response (contrained motion)
3. resting contact (contrained motion with stacking of objects)
4. joints (constrainted contact)
5. foward kinematics
6. reverse kinematics

For what it's worth, Genesis FX currently has level 2 partially complete (interparticle collisions and resting contact coming in v1.1).

Mike

Hmm Im not sure if, as an Alpha tester,  I can sya very much...

I hoep im not rbeakign NDA with thsi... The current library does coliision dection of collision vlumes (currently spheres though other forms are planned) against a scene graph and returns penetration vectors for calculation o responses.  Above that its left up to the game because how a game uses the data tends to be pretty game spcific. (I'm jsut pushing objects back to bound motion  in JNWN.  This combined with a gravity impulse "down"gives me surface walking and wall-limiting of motion.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
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.

TehJavaDev (17 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (67 views)
2014-08-11 02:49:23

BurntPizza (45 views)
2014-08-09 21:09:32

BurntPizza (36 views)
2014-08-08 02:01:56
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!