Translation problem in processing.js program?
in
Processing with Other Languages
•
9 months ago
Hi everyone!
This is my first post on this forum, so I apologise if I'm doing anything wrong.
I've been creating a Copter game recently, but I have a problem. I have a function
drawHelicopter()
which looks like this:
- void drawHelicopter() {
- // translate bird according to position of mouse cursor
- translate(-20, mouseY);
- /* helicopter code */
- }
- void drawObstacle(x, y) {
- // make sure the obstacle doesn't get translated as well
- translate(0, 0);
- /* obstacle code */
- }
What do I need to do in order to stop the obstacles from moving with the mouse?
Thanks!
1