Alien Swarm style laser aiming

Hello!

I am working in my sidescroller trying to set up some feedback on which direction the player is aiming with the right joystick. The image below has some reference for what I mean.

Our shooting is 360 degrees around our player. I want to rotate the pointer(cone at the top) around the player pivot based on the direction the RightJoystick is actively pointing. I have the necessary nodes for pulling the information of the right joystick inputs. Just not sure how to offset the pointer from the center pivot of the player and then plug in the rotation information to update it as the player is actively aiming.

The ultimate goal is to fire a line trace from the position of the cone to set up a start and end point for a laser beam particle effect to give a visual aiming system just like the one in Alien Swarm. I have been through a few different tutorials for laser sights but most of them are very basic. Any tips or tricks are appreciated. You can see the laser in action in this video.

Cheers!

I

You can do that using simple math:

X := originX + sin(angle)*radius;
Y := originY + cos(angle)*radius;

(originX, originY) is the center of your circle. radius is its radius. That’s it.

http://i.stack.imgur.com/E5spU.gif

Cheers.

Source: http://gamedev.stackexchange.com/questions/9607/moving-an-object-in-a-circular-path