Hiya.
I’m thinking about a control method where the direction and strength of a force is applied to a gameobject based on the path and speed of the cursor /through/ that object.
To get the force, I’m thinking this can be done simply by using OnMouseEnter, then set a timer running, then at OnMouseExit taking the time and using it as the variable for the force. But what about getting the direction? I guess I’d have to raycast from the camera (static) and work out the hit.point for both the cursor entry point and the cursor exit point over the gameobject, then use this line as the direction relative to camera.
That sound feasible to you guys and gals? I think I can handle the timer bit, but I could use some code help getting the direction!