P acting like H (hpr)

before i execute the 2nd bit of code, 1st line of code will ratoate the airplane model up, as if it was pitching up

i then “roll” the airplane to the side, (in this case, green arrow is pointing forward) by 90 degrees. in a real plane, if you roll the plan to the side and “pull up”, you actualy turn in the direction you’ve rolled. however, when i try to execute the 3rd bit of code to do this, the model ignores the fact that it has rolled, and rotates upwards like it did in step one (notice the color of the arrows? the grey circle is the direction its turning.)

it shouldnt do this. how can i make it work more like an aircraft?

I believe this has come up in the forums before, search around.
You’re probably looking for relative rotations:

self.playerShipNP.setP(self.playerShipNP, 1)
self.playerShipNP.setR(self.playerShipNP, 90)
self.playerShipNP.setP(self.playerShipNP, 1)

was this covered in the manual? im coming across handy things here and most feel like they should be mentioned somewhere in the tutorial. (it presumes you know alot more than you do… for example i didnt know Point3(0,0,0)/20 or +Point3(0,0,5) would work…is that supposed to be a given in python?)

thanks for the help :slight_smile:

Yeah, well, with 1.6.0 the Vec3/Point3 thing became pretty flexible. You can do basically anything with it - you can treat them as tuples, the other way around, etc. But there’s one thing you need to keep in mind.
This won’t work:

3 * Vec3(1, 2, 3)

But this will:

Vec3(1, 2, 3) * 3

Since in the first case, it will invoke int.rmul, which doesn’t know about vectors - in the second case, it will invoke Vec3.rmul, which does know about ints.
Same story with add, subtract.

alright cool. thanks yet again