Collision and update controllers

I think I would make sence to include collision controllers that could be attached to the node. This would alow the game to be updated much similarly and make jme less hard to program jme games for the reason I put hear.

I have asked if we could have something similar to this:



Node.setChildernModelBounds(new BoundingBox()); // or similar



And that would just irritate through the arraylist of childern, and set the bounding box as their modelbound.

Not sure what others think of this tho

Each node could update collision distension for itself in the appropriate form. For example TriMesh could automatically test triangle collision.If there is a collision it would call a handler for that node.

as discussed in the other thread, Triangle collision detection and pixel collision detection might be slow. So a heirarchy of things is better. This is just a mere speculation to the performane of triangle/pixel collision, but I would think they will be slower.

"DarkProphet" wrote:
I have asked if we could have something similar to this:


Node.setChildernModelBounds(new BoundingBox()); // or similar



And that would just irritate through the arraylist of childern, and set the bounding box as their modelbound.

Not sure what others think of this tho

You seam to miss understand my post. I am talking about replacing com.jme.intersection with functions inside the Spatial that are called during update

aaah, so something along the lines of…:



public void update(float time) {
  if (CollisionDetectHasOccured(this)) {
      // do something
  }
}



That would be good yeah. But think about it, you have to create your own controller, not that hard really, but that means that its an extra object to instantiate. And in large games, you want to collide with everthing, that would DOUBLE the amount of objects you have, and in java, thats a serious issue.
"DarkProphet" wrote:
aaah, so something along the lines of...:


public void update(float time) {
  if (CollisionDetectHasOccured(this)) {
      // do something
  }
}



That would be good yeah. But think about it, you have to create your own controller, not that hard really, but that means that its an extra object to instantiate. And in large games, you want to collide with everthing, that would DOUBLE the amount of objects you have, and in java, thats a serious issue.

Maybe they can be optional so large games do not have to use them.
look at the advantages.