How can I get vector coordinates from a raycast relative to an object?
I am making a touch-screen game where the character is moved by touching the ground around them. I've come up with various systems of movement and decided this was the best way to keep consistency without vectors being skewed by the screenspace coordinates or world coordinates due to perspective.
I need to send a raycast and it create a vector that uses the offset of the raycast origin's position and the object origin's position. It should look something a bit like this diagram.
Assume that, without this system, the hypothetical vector would be something like (45, 62). This scenario assumes the vector would emulate or be a 2D vector, discarding the 3D y-value or using a 2D y-value as a z-value for movement.
I want to use this setup because it should allow more consistent movement -- coordinates are even all across the screen (assuming the object faces the camera flatly) and vectors won't gain a biased increase rate when moving the tap/touch point upward, as is the case when raycasting into the scene and moving to the touch point.
Thank you,
~hy
Your answer
Follow this Question
Related Questions
Buttons for Player movement 0 Answers
Want to move a character around a map using phones GPS 0 Answers
How to stop player from moving forward when they run into a wall? 0 Answers
Raycast Check in GetKey? 0 Answers