Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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 875 times)
0 Members and 1 Guest are viewing this topic.
Offline xema23

Junior Newbie





« Posted 2005-10-19 16: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 23: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-20 00: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!
Try the Free Demo of Revenge of the Titans
Offline xema23

Junior Newbie





« Reply #3 - Posted 2005-10-20 17: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-21 00: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 03: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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (87 views)
2013-05-16 21:24:48

gouessej (117 views)
2013-05-16 00:53:38

gouessej (112 views)
2013-05-16 00:17:58

theagentd (123 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (177 views)
2013-05-12 15:36:09

UnluckyDevil (185 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.089 seconds with 21 queries.