Q:

How can I point an object to a certain point in Box2DJS + Cocos2DJS

I'm trying to simulate an archery shooting game and I want to animate the bow to point where my mouse is.  How can I do this?  I already tried binding a joint and using this for mouse follow:
this.bow. SetTransform(new b2Vec2(x/30, y/30), this.bow. GetAngle());

but it always comes up with an error:
Uncaught TypeError: Object [object Object] has no method 'GetAngle'
I already searched for the error but it was not found in Google.  Is there a way to fix this or another way to implement the bow-mouse follow? 

A:

The source code of the SetTransform method looks like this: 
 b2Body.prototype. SetTransform = function (xf) {
      this. SetPositionAndAngle(xf.position, xf. GetAngle());
 }

Try calling SetPositionAndAngle instead of SetTransform

