Mouse interaction

Share your projects and Chipmunk enhancements.
MathieuSlico
Posts: 6
Joined: Tue Mar 13, 2012 7:26 pm
Contact:

Re: Mouse interaction

Post by MathieuSlico »

Hi,

I'm new here and i'm really interested in trying out cpmouse, I think that it would work great for my project, I cant seem to find the code for cpmouse, so I was wondering if it is still available..

thank you so much for your help in advance,

sincerely,
Mat, :mrgreen:
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Mouse interaction

Post by slembcke »

Not sure about cpMouse (I didn't make it), but it's pretty easy to do it yourself. The demo app does it like the following.

This is called when the mouse is clicked or released:
https://github.com/slembcke/Chipmunk-Ph ... emo.c#L352

Then there are a couple of lines that get called to update it each frame:
https://github.com/slembcke/Chipmunk-Ph ... emo.c#L256
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
MathieuSlico
Posts: 6
Joined: Tue Mar 13, 2012 7:26 pm
Contact:

Re: Mouse interaction

Post by MathieuSlico »

hey thank you for your quick answer, I just realized now that you got back to me so quickly, I was expecting to wait a week. :P

:D :D :D
Carmella91
Posts: 1
Joined: Tue Aug 21, 2012 4:13 am
Contact:

Re: Mouse interaction

Post by Carmella91 »

Thanks for the codes and links posted here.
Saved much of my time today;)
Hope to find some more helpful stuff here.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests