Mouse interaction

Share your projects and Chipmunk enhancements.

Re: Mouse interaction

Postby MathieuSlico » Tue Mar 13, 2012 9:02 pm

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:
MathieuSlico
 
Posts: 6
Joined: Tue Mar 13, 2012 7:26 pm

Re: Mouse interaction

Postby slembcke » Wed Mar 14, 2012 2:05 pm

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Mouse interaction

Postby MathieuSlico » Tue Mar 20, 2012 12:09 am

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
MathieuSlico
 
Posts: 6
Joined: Tue Mar 13, 2012 7:26 pm

Re: Mouse interaction

Postby Carmella91 » Tue Aug 21, 2012 4:16 am

Thanks for the codes and links posted here.
Saved much of my time today;)
Hope to find some more helpful stuff here.
Carmella91
 
Posts: 1
Joined: Tue Aug 21, 2012 4:13 am

Previous

Return to Community Creations

Who is online

Users browsing this forum: No registered users and 1 guest