- Joined
- Feb 9, 2019
- Messages
- 44
- Thread Author
- #1
This is more conclusion by observation. Though it appears when I query for a GameObject, it returns the correct one. If i do
obj.interact("interaction...")
it looks like it will only interact with the object of the "interaction" is still at the old mouse position. But if the player was to move, this would only be successful if the player was stationary. On the other hand if I do:
obj.click();
It will click on the target mouse position regardless if target is still there. What I wanted to find out, was what is the best way for a player to be moving while correctly interacting with an object, is it possible to get an up-to-date mouse position of target while player is moving to give a new position without doing the full query?
It appears the calculation isn't quite fast enough to return out of the function and interact with the object while my player is on the move, by then the mouse position is already too old. This could be my hardware or whatever else.
Nonetheless is there a better way to interact with these objects while on the move? Or is the only way to have the camera so I am running directly at the target where the mouse position doesn't require to be moved?
obj.interact("interaction...")
it looks like it will only interact with the object of the "interaction" is still at the old mouse position. But if the player was to move, this would only be successful if the player was stationary. On the other hand if I do:
obj.click();
It will click on the target mouse position regardless if target is still there. What I wanted to find out, was what is the best way for a player to be moving while correctly interacting with an object, is it possible to get an up-to-date mouse position of target while player is moving to give a new position without doing the full query?
It appears the calculation isn't quite fast enough to return out of the function and interact with the object while my player is on the move, by then the mouse position is already too old. This could be my hardware or whatever else.
Nonetheless is there a better way to interact with these objects while on the move? Or is the only way to have the camera so I am running directly at the target where the mouse position doesn't require to be moved?