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.
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.