# 'Angry Birds' type shooting mechanic help

So I have a basic shooting mechanic for an angry birds type game but I am having problems with figuring out how to determine the force by how far back the mouse is dragged. Any and all help would be appreciated. Below is a picture of what I have so far.

Presuming that your just simply trying to convert that vector (initial location - current location) into the force of the shot, just get rid of the normalize node. Itâ€™s reducing the length of that resulting vector to 1.0f. You want the length of that vector to matter.

Then just continue to do what youâ€™re doing (multiple the result by a float to scale it by a sensible amount.

Cool! That works perfectly! Is there a way to set the maximum vector of the mouse pull back so the player cant get crazy amounts of values?

You can use the â€˜ClampVectorSizeâ€™ for that.

The clamp doesnt seem to be working.

I doubt itâ€™s the clamp thatâ€™s not working (and I doubled checked here too), something else must be going wrong.

If you print out the results of the clamp, what sort of values to do you get? What are you hoping to see? Have you tried reducing the maximum size?

It looks like it prints the y and z values but it still isnâ€™t applying the force to it. Itâ€™s weird though because when i set the min to 0 and the max to 9000000000000 or some crazy number it will apply force.

Iâ€™m not really sure what to suggest at this point - If itâ€™s working without the clamping, but not without, are you sure the size of the vector isnâ€™t just really small, or in the wrong direction or something? You could try working out what sort of value gives you the result you want (plug the numbers in yourself, straight into â€˜Forceâ€™) and then compare them to the results youâ€™re getting and see whatâ€™s going wrong.