Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
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 2767 times)
0 Members and 1 Guest are viewing this topic.
Offline misterX

Junior Devvie

java forever!

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

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?
Offline misterX

Junior Devvie

java forever!

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

Offline misterX

Junior Devvie

java forever!

« Reply #2 - Posted 2003-05-31 19: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 Devvie

Medals: 1

Who, me?

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

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

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:

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 Devvie

Java games rock!

« Reply #4 - Posted 2003-05-31 22: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 Devvie

java forever!

« Reply #5 - Posted 2003-06-01 07: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.

Ecumene (54 views)
2017-09-30 02:57:34

theagentd (77 views)
2017-09-26 18:23:31

cybrmynd (185 views)
2017-08-02 12:28:51

cybrmynd (183 views)
2017-08-02 12:19:43

cybrmynd (190 views)
2017-08-02 12:18:09

Sralse (200 views)
2017-07-25 17:13:48

Archive (756 views)
2017-04-27 17:45:51

buddyBro (890 views)
2017-04-05 03:38:00

CopyableCougar4 (1439 views)
2017-03-24 15:39:42

theagentd (1322 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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‑
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!