Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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  
  WakeupOnCollisionEntry  (Read 1452 times)
0 Members and 1 Guest are viewing this topic.
Offline misterX

Junior Member




java forever!


« Posted 2003-05-13 10:15:15 »

hi,
again, i've a question.
I'm using a behavior using 'WakeupOnCollisionEntry, it works but it "wakes up" for any collision, with any shape.
I thought only the nodes with ENABLE_COLLISION_REPORTING capability would, *could* raise the criterion, but it doesn't seem to be the case.
Does anyone knows how to avoid collision reporting from certain nodes?
thanks
Offline misterX

Junior Member




java forever!


« Reply #1 - Posted 2003-05-26 10:55:50 »

nobody?
Offline misterX

Junior Member




java forever!


« Reply #2 - Posted 2003-05-31 21:43:02 »

damn, are there only niewbies around here or what?  Huh It seems like no one ever needed to detect collision!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cfmdobbie

Senior Member




Who, me?


« Reply #3 - Posted 2003-05-31 22:33:26 »

Don't know if this will help you, but from the JavaDocs:

Quote
ENABLE_COLLISION_REPORTING
public static final int ENABLE_COLLISION_REPORTING
Specifies that this Node will be reported in the collision SceneGraphPath if a collision occurs. This capability is only specifiable for Group nodes; it is ignored for leaf nodes. The default for Group nodes is false. All interior nodes not needed for uniqueness in a SceneGraphPath that don't have ENABLE_COLLISION_REPORTING set to true will not be reported in the SceneGraphPath.
See Also:
SceneGraphPath


Quote
public class SceneGraphPath
extends java.lang.Object
A SceneGraphPath object represents the path from a Locale to a terminal node in the scene graph. This path consists of a Locale, a terminal node, and an array of internal nodes that are in the path from the Locale to the terminal node. The terminal node may be either a Leaf node or a Group node. A valid SceneGraphPath must uniquely identify a specific instance of the terminal node. For nodes that are not under a SharedGroup, the minimal SceneGraphPath consists of the Locale and the terminal node itself. For nodes that are under a SharedGroup, the minimal SceneGraphPath consists of the Locale, the terminal node, and a list of all Link nodes in the path from the Locale to the terminal node. A SceneGraphPath may optionally contain other interior nodes that are in the path. A SceneGraphPath is verified for correctness and uniqueness when it is sent as an argument to other methods of Java 3D.

In the array of internal nodes, the node at index 0 is the node closest to the Locale. The indices increase along the path to the terminal node, with the node at index length-1 being the node closest to the terminal node. The array of nodes does not contain either the Locale (which is not a node) or the terminal node.

When a SceneGraphPath is returned from the picking or collision methods of Java 3D, it will also contain the value of the LocalToVworld transform of the terminal node that was in effect at the time the pick or collision occurred. Note that ENABLE_PICK_REPORTING and ENABLE_COLLISION_REPORTING are disabled by default. This means that the picking and collision methods will return the minimal SceneGraphPath by default.


Don't know if any of this is new to you, but it might jog someone's memory...

Hellomynameis Charlie Dobbie.
Offline Daath

Junior Member




Java games rock!


« Reply #4 - Posted 2003-06-01 00:53:20 »

I don't think there are only newbies here...rather it might be that majority figured already collision behavior is basically useless for detecting collision since it reports only when collision already happened. PickSegment approach is AFAK the only way to make it work - meaning: ....find out that collision is about to happened and make whatever evasive action ......
Offline misterX

Junior Member




java forever!


« Reply #5 - Posted 2003-06-01 09:29:54 »

Thank you both for the replies, even if i'm still stuck  :-/.

Daath: in fact, i'm pretty pleased with the collision detection, even if it "only" detects when the collision occurs. All the movements are smooth enough. Anyway, it's performant and i think i couldn't write a better one (for general collisions).

cfmdobbie: hmm... yeah, this is like light ray. It is not said that the collision won't be reported but that it won't be included in the collision SceneGraphPath... slightly different.

:-/ :-/ :-/ damn!

...i'll try something else...
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.

xsi3rr4x (23 views)
2014-04-15 18:08:23

BurntPizza (18 views)
2014-04-15 03:46:01

UprightPath (32 views)
2014-04-14 17:39:50

UprightPath (16 views)
2014-04-14 17:35:47

Porlus (32 views)
2014-04-14 15:48:38

tom_mai78101 (58 views)
2014-04-10 04:04:31

BurntPizza (116 views)
2014-04-08 23:06:04

tom_mai78101 (216 views)
2014-04-05 13:34:39

trollwarrior1 (183 views)
2014-04-04 12:06:45

CJLetsGame (190 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!