You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It's difficult, maybe impossible, to make custom first person camera systems (that don't use lock to player). The problem I have is obtaining the mouse delta to update the camera rotation based off of the mouse movement. When using UI.GetCursorPosition() to retrieve the cursor position and comparing it to the position of the previous frame to generate a mouse delta, the cursor may collide with the edges of the viewport. This collision restricts the cursor's movement, and leads to false mouse delta data.
Describe the solution you'd like
If there was a function to manually set the cursor's position, one could set it to the center of the screen after cursor movement was detected, and then use the data from the cursor movement to generate mouse delta data. Another possible solution would include a UI.GetMouseDelta() that returns a vector2 value containing the movement of the mouse during the previous frame.
Describe alternatives you've considered
Simply using the First Person Camera template would be the most straightforward solution, but I want more freedom over the camera's positions and data. Whenever the camera is locked to the player, the :GetWorldPosition() and :GetWorldRotation(), as well as the functions to set them don't work properly.
Is your feature request related to a problem? Please describe.
It's difficult, maybe impossible, to make custom first person camera systems (that don't use lock to player). The problem I have is obtaining the mouse delta to update the camera rotation based off of the mouse movement. When using UI.GetCursorPosition() to retrieve the cursor position and comparing it to the position of the previous frame to generate a mouse delta, the cursor may collide with the edges of the viewport. This collision restricts the cursor's movement, and leads to false mouse delta data.
Describe the solution you'd like
If there was a function to manually set the cursor's position, one could set it to the center of the screen after cursor movement was detected, and then use the data from the cursor movement to generate mouse delta data. Another possible solution would include a UI.GetMouseDelta() that returns a vector2 value containing the movement of the mouse during the previous frame.
Describe alternatives you've considered
Simply using the First Person Camera template would be the most straightforward solution, but I want more freedom over the camera's positions and data. Whenever the camera is locked to the player, the :GetWorldPosition() and :GetWorldRotation(), as well as the functions to set them don't work properly.
Additional context
Here is a forum post I've made about the issue https://forums.coregames.com/t/cant-reliably-obtain-mouse-delta/2755
Thank you.
The text was updated successfully, but these errors were encountered: