[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] my 3d planet game



On Fri, Jun 13, 2008 at 07:21:30PM +1000, Astan Chee wrote:
> >* When dragging with RMB, the mechanics feel off.  The mouse cursor
> >should stay on top of roughly the same bit of space as I drag it, not
> >have the space go zooming out past it.
> >  
> I dont know how to do this in pygame. Is there an example somewhere of 
> how to do this?

WHen you recieve the right mouse button's mouse down event, store the 
X/Y position of the mouse. Then, until you recieve the mouse up event, 
position the camera according to the difference between the current 
position of the mouse and the position when the right button was first 
pressed.

---
James Paige