Welcome, Guest. Please login or register.
Did you miss your activation email?
July 31, 2010, 11:42:46 am
advanced search




Pages: [1]
  Print  
Author Topic: Detecting collisions with physics 2.  (Read 1027 times)
sayers
Newbie
*
Offline Offline

Posts: 15


View Profile
« on: September 05, 2008, 04:45:24 am »

I'm trying to detect if my waterNode lands on a scoreBoard (or touches it) , though the hasCollsion doesn't seem to work. http://code.google.com/p/tlc-spacegame/source/browse/trunk/client_dev/src/mg/house/WaterFilter/FilterGameState.java#273 Line 273 is where the mess starts.
Logged
snareoj2
Jr. Member
**
Offline Offline

Posts: 110


View Profile
« Reply #1 on: September 05, 2008, 12:33:46 pm »

I only had a quick look through your code and i saw this in line 215:
Code:
else if (cubeDropped = true)
Theres only one "="...

About your problem: I think you use JmePysics2 - the PhysicsGameState?
But your code uses the jme-build-in collision detection.

There is somewhere a collision-callback interface in JMEPhysics2, where you get Collisionresponses from JmePhyiscs2. Irrisor perhaps knows more...

Also the initialisation in the constructor is perhaps a problem - you call node.generatePhysicsGeometry() before PhysicsSpace.create()....

Regards
snare
Logged

irrisor
Champion
Hero Member
*
Offline Offline

Posts: 3253



View Profile WWW
« Reply #2 on: September 05, 2008, 02:04:24 pm »

There is somewhere a collision-callback interface in JMEPhysics2, where you get Collisionresponses from JmePhyiscs2.
that's true. give the physics tutorials a try smiley
Logged

Ad: Please contribute to the jME Physics 2 Wiki Smiley
Tags:
Pages: [1]
  Print  
 
Jump to: