Follow the mouse around
Lets say my game has a gun. The user selects it and I would like the gun to follow the mouse (which I can do with constrain attribute) I would like for the gun to be offset based on the location of where the mouse is pointing. So lets say I have an object on the floor. If I drag my mouse over to where the object is I would like the gun to be offset the opposite side of the mouse compared to the object. (If any of that makes sense.) Then when fired I would like the bullets to go in the correct direction toward the object assuming I'm pointing at it
Comments