Hello! I’m trying to come up with a pointer control where pressing & holding would move a character model towards the pointer position while the pointer is pressed. I’ve came up with most of the code for it, however, JS pointerdown event is not like keydown that keeps being fired as long as it’s pressed. This causes a behavior where the raycaster won’t be updated if pointer is not moving. Any ideas to circumvent this?
Thanks for the reply! I’m doing the same thing as you suggested. The problem is, however, that the camera is always following the character, so I also wanted the mouse down position to be updated.
Example:
(Note: the red sign is shown as long as the user is clicking)
The behavior I want here is to keep updating the cursor position as long as the mouse button is being pressed. Basically the distance between the cursor position and the character itself won’t ever change, if that makes sense