hi jean,
hi all
im having trouble with making a "paper toss" mechanism with the mouse actions.
i get the position of the mouse and translate it to world point, set the position of the object i want to move, etc.
everything is working great, except i didnt mange to do 2 things:
1.i dont know how to translate the angle of the mouse swipe/drag to a directional z rotation. i tried mouse look, or subtracting the end Mouse X to the start X position and sample curve it to degrees measurements, Vector 3 operators, and a lot of creative stuff. but no luck there. what is the most straight-forward simplest way of achieving this?
2. for now, as i release the mouse button, i set a force in a z direction by taking the distance between the release position and the initial click.
Meaning- the force amount does not take to account the speed/time of the swipe, only the distance. How can i measure the speed of the mouse drag to use it to calculate the force amount according to it.
I was surprised to discover there is no tutorials on this, considering this mechanism is used in so many mobile games. my end goal is also to translate the mouse actions to touch actions (i have input touches). is there any difference in approaching it, regarding mouse as opposed to touch?