Set Origin for MouseMove

In my game, I’m using the MouseMove trigger to control the angle at which a projectile fires; however, for some reason, when I tested it, the origin is centered in the top left corner (so when the mouse is in the top left it is (0,0)) instead of the center of the object like the help page suggests: “X outputs the mouse position on X axis, relative to object.” Is this because the help page hasn’t been updated or is there some setting that controls where the origin is?

I hope you can help, Cameron

Can you post a link to your game? I’m not familiar with mouse controls, but I can probably figure it out through trial and error.

The documentation must be out of date - sorry about that. You can make it relative to the object by subtracting the object’s x & y properties from the mouse position outputs though. this is my game so far, you move with the arrow keys and I want the mouse to control the angle that the caveman throws the club. I’m using a blank sprite to emit the club and I think ill also use the blank sprite to emit a small line of red dotes to show where he is aiming before you shoot. The problem is the place where the x and y needs to be centered needs to move as well. So i couldn’t just subtract the x and y coordinates unless there is some way of locating a sprite??

So are you just trying to get the caveman to throw clubs wherever you click? If that’s it, I think we have a few examples around here on how to get an object to stick to the mouse. Then you just need the club to “point at” that object stuck on the mouse, and clicking emit the clubs velocity forward, or something like that. I’m not 100% sure if that is what you are trying to do.

Basically what I’m trying to do is make the mouse control the speed and angle of the throw, at the moment I’m just trying to get it to do the angle. I’m hoping it will end up something like how angry birds works. Your suggestion sound easier so i might try that out but thanks for all you help :slight_smile: