Mouse cursor offset

Hi everyone,

I’m using a ‘rotate towards cursor’ script and a custom cursor script to simulate a crosshairs towards which my character is shooting. The scripts both work well, but the graphic I’ve used is registered to the top, right corner, meaning that the character shoots towards the top, right corner and not the center of the custom graphic. Is there a way to offset the custom graphic by half its size, or should I consider amendments to the scripts?

Thanks,
PS

How are you rendering the cursor? Are you using the built-in GUI functionality?

If so, centering the cursor should just be a matter of offsetting the origin of the rect you’re using by half the size of the rect in each direction (x and y).

Thanks Jesse, I will give that a try…