Quantcast
Viewing all articles
Browse latest Browse all 4

Answer by stockhouse50

Ok, I am willing to start from scratch on this rotation idea so if that means using an alternative to lookAt() I'm fine with that. I attached a schematic and I will try to explain it in further detail. The game is 2D with an overhead/birds eye view of the spaceship. Basically wherever the mouse cursor moves on the screen, I want the spaceship to rotate only around the z-axis ( basically if a rod came out from the screen, it would rotate around that as shown in the schematic.) and have the front facing towards the mouse cursor. ![alt text][1] So in the schematic pretend the arrow is the cursor and the front is always facing the cursor. The green triangles in the schematic are the bullets. When the bullets are instantiated, the front of the bullet is in the same direction as the spaceship. If I explained anything poorly or used wrong terminology please correct me because I am trying to learn the lingo along the way. Thanks. [1]: /storage/temp/44727-spaceship-rotation.jpg

Viewing all articles
Browse latest Browse all 4

Trending Articles