Hi, I am trying to replicate the mouse example from c to chipmunk-js. I did replicate it fine when using cocos2d-html5 but when running on iphone with cocos2d-js it didnt work because the pivotjoint only takes 1 anchor point when creating it...
https://github.com/slembcke/Chipmunk2D/ ... emo.c#L398
How can I make this work with only 1 anchor point?
Mouse/Grab with PivotJoint for cocos2d-js
-
- Posts: 9
- Joined: Thu Jul 25, 2013 12:42 pm
- Contact:
Mouse/Grab with PivotJoint for cocos2d-js
Last edited by jhneves on Thu Jul 25, 2013 7:33 pm, edited 1 time in total.
-
- Posts: 9
- Joined: Thu Jul 25, 2013 12:42 pm
- Contact:
Re: Mouse/Grab with PivotJoint
I solved it.
What I did was set the mouseBody position to the location of click/touch before creating the PivotJoint.
And as anchor for the joint I use the position of the click/touch.
What I did was set the mouseBody position to the location of click/touch before creating the PivotJoint.
And as anchor for the joint I use the position of the click/touch.
-
- Posts: 4
- Joined: Mon Oct 21, 2013 8:34 am
- Contact:
Re: Mouse/Grab with PivotJoint for cocos2d-js
Hi, Could you post here your code snippet for that?
-
- Posts: 1
- Joined: Thu Feb 13, 2014 1:21 am
- Contact:
Re: Mouse/Grab with PivotJoint for cocos2d-js
What exactly is javascript? and is there a way I can enable it on my computer because when I'm on different websites I keep getting pop-ups saying that I need javascript to continue.
_______________________
movies clip ~ music video ~ video collection
_______________________
movies clip ~ music video ~ video collection
Who is online
Users browsing this forum: No registered users and 2 guests