The problem about not being shot from the camera center was a problem when modeling the bullet. It was moved a bit from the center. Anyway rotating it the PI/2 over the Y axis was helpfull too. Now the bullets are being fired correctly.
Now my problem is that they doesnt fire any collision event. I added a collisionListener to the bullets but they does not fires the event. I have used the collision listener before when moving the crafts on the server but when shooting the bullets on the client they dont.
Basicly.
When I create the bullet I add the colissionlistener, the bullet and the map has CHECK_SELF | CHECK_OTHERS as the collision mode. I am calling the checkforcollision and checkforcollisionelipsoid methods and they doesnt fire any event. The project is posted at:
melssj5.paulscode.com/FlierMatch.zip
Egon, can you please replace the one in the download section with this new one, is still not finished but it is closest to be finished. And please can any one help me with the collisionListening on the bullets?
About the code: Well, I have this classes:
- BulletThread (Thread for moving the bullets and detecting the collisions)
- ManejadorDisparos ("ShotManager"--> add the bullets to the List of bullets to be moved, moves the loist of bullets, creates the predefined bullet types to be used in the game)
- Disparo ("Shoot"--> Is the shot class, it has the position, direction, speed, and the bullet. Has the methods to move the bullet it has)
- Bullet (Is an inherited class from Object3d that has the damage, type, sounds to play)
The code and var names are in Spanish and the code is a kind of messy but any help would be very appreciated. Actually the shots are being fired with the control key or the space key. They are being shoot from a class called ManejadorEventos an the end of the method EventosJuego.