Nox587
08-08-2007 15:04:52
I am using the latest Ogrenewt from CVS, and I did a lot of searching around to find out what was causing my problem.
I was creating a cylinder with the cylinder collision primitive, and I supplied a position and orientation as parameters to the constructor. I then create a body, attach a node, and call the setPositionOrientation method on the body.
This for some reason was causing my collision to be in a different position then my node/entity. I tried several things to correct this, and in the end the only thing that worked for me was removing the position and orientation parameters in the constructor of the cylinder primitive.
The position and orientation values I used for the constructor are the same as the ones provided to the setPositionOrientaiton method, but for some reason supplying them to the constructor doesn't seem to work correctly. It also seems that the orientation of the cylinder was off, as one half of it would "float" off the box it was coliding with (this was with a force of 9.8m/s down the y axis).
I noticed there is a method being called in the constructor converting the position and orientation into a matrix, perhaps there is a bug in this method?
I was creating a cylinder with the cylinder collision primitive, and I supplied a position and orientation as parameters to the constructor. I then create a body, attach a node, and call the setPositionOrientation method on the body.
This for some reason was causing my collision to be in a different position then my node/entity. I tried several things to correct this, and in the end the only thing that worked for me was removing the position and orientation parameters in the constructor of the cylinder primitive.
The position and orientation values I used for the constructor are the same as the ones provided to the setPositionOrientaiton method, but for some reason supplying them to the constructor doesn't seem to work correctly. It also seems that the orientation of the cylinder was off, as one half of it would "float" off the box it was coliding with (this was with a force of 9.8m/s down the y axis).
I noticed there is a method being called in the constructor converting the position and orientation into a matrix, perhaps there is a bug in this method?