SushiMasters / Final-Project

Repository for UCMHS Intro to Programming Final Project
0 stars 2 forks source link

How to rotate cannon on an axis? #5

Open shivani517 opened 8 years ago

shivani517 commented 8 years ago

rotate(), translate(), pushMatrix(), popMatrix()

shivani517 commented 8 years ago

Created a variable, theta = 0.3-atan2(600-mouseY, mouseX), and temporarily translated the origin to 0, 600 using pushMatrix() and popMatrix() and translate(0,600) to use that as an axis that I used rotate(theta) on