Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
Jose M.
Jose M.'s Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Follow the mouse with a sphere
[2 Replies]
07-Mar-2012 03:10 AM
Forum:
Contributed Library Questions
Hello,
first time I write here :)
I was creating an eye (textured sphere), and the idea is to follow the mouse.
So in the draw method I have rotateX and rotateY:
background(0);
GLGraphics renderer = (GLGraphics)g;
renderer.beginGL();
translate(width/2, height/2, 0);
pushMatrix();
rotateX(radians(mouseX));
rotateY(radians(mouseY));
renderer.model(sphere);
popMatrix();
renderer.endGL();
But this doesn't work, I don't know if I have to adjust the rotation with something apart from mouseX and mouseY.
I hope you can help me, thanks in advance!
«Prev
Next »
Moderate user : Jose M.
Forum