I want setHPR relative

I have a game with a steerable torpedo, and the camera follows the torpedo. Steering is done with the arrow keys. But now when i have steered a little with right, and then i steer with for instance down, the torpedo rotates around the main x,z,and y axes of the game, but i want the axes of the torpedo steer together with it. so they should be relative. How is this possible?


yourNP.setHpr(otherNP, 1, 2, 3)

will rotate yourNP relative to otherNP. You can also rotate it relative to itself:

yourNP.setHpr(yourNP, 1, 2, 3)