Generally speaking about right-click interaction with objects. If it is small like chest or foragable, and you're moving, rightclicking on the object with cursor over it won't work. You have to put cursor about a tile away from the object in the direction opposite your movement, in other words, you have to predict where object will be in about a second after you click and put cursor in this position to succesfully hit the object. Seems like raycasting(or another method devs are using) is calculated with a delay. This is really annoying, also makes hitting dragonflies really hard. Not sure if this is intended feature against botting but if it is so then it is against players too. If this is going to be fixed i would like to suggest adding the hitboxes for mouse activity, as you can accidentally click beteween two branches of a bush and it wouldn't work again.
Also with the help of custom clients that draw a line from character to the point where he's heading to, you can notice that sometimes character goes not in where the cursor is, but a little bit higher and a little bit on right.
-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: Broken raycasting
I think client server latency has more to do with the problem than an error in the algorithm. After six years of playing, it's existed since I've been here. When the server latency is low, the issue goes away. When it's up, it's horrid.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
-
ghozzd
- Posts: 30
- Joined: Thu Jul 11, 2013 6:21 pm
Re: Broken raycasting
Never noticed it in W7. Also i personally think that such thing as raycasting shoud be client-based and not server-based.MagicManICT wrote:I think client server latency has more to do with the problem than an error in the algorithm. After six years of playing, it's existed since I've been here. When the server latency is low, the issue goes away. When it's up, it's horrid.
-
boshaw
- Posts: 1612
- Joined: Tue Jun 01, 2010 10:22 pm
Re: Broken raycasting
A click is delayed to the start of a new mapview draw, but I could only imagine your issues if you had horrible fps.ghozzd wrote:Generally speaking about right-click interaction with objects. If it is small like chest or foragable, and you're moving, rightclicking on the object with cursor over it won't work. You have to put cursor about a tile away from the object in the direction opposite your movement, in other words, you have to predict where object will be in about a second after you click and put cursor in this position to succesfully hit the object. Seems like raycasting(or another method devs are using) is calculated with a delay. This is really annoying, also makes hitting dragonflies really hard. Not sure if this is intended feature against botting but if it is so then it is against players too. If this is going to be fixed i would like to suggest adding the hitboxes for mouse activity, as you can accidentally click beteween two branches of a bush and it wouldn't work again.
Also with the help of custom clients that draw a line from character to the point where he's heading to, you can notice that sometimes character goes not in where the cursor is, but a little bit higher and a little bit on right.
-
Granger
- Posts: 9255
- Joined: Mon Mar 22, 2010 2:00 pm
Re: Broken raycasting
Server latency has nothing to do with clicking objects.
When you click into the world a ray is cast, but that seems to happen on the next frame (not the one you clicked in) so in case you're moving (or the thingy you clicked on is) it might not be under the mouse when the ray ist cast. Should the ray intersect with an object the server is informed that you clicked on the object through the ID of it - so bots have no problem at all since they call the click on the object instead of a position in the image.
When you click into the world a ray is cast, but that seems to happen on the next frame (not the one you clicked in) so in case you're moving (or the thingy you clicked on is) it might not be under the mouse when the ray ist cast. Should the ray intersect with an object the server is informed that you clicked on the object through the ID of it - so bots have no problem at all since they call the click on the object instead of a position in the image.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
-
ghozzd
- Posts: 30
- Joined: Thu Jul 11, 2013 6:21 pm
Re: Broken raycasting
Nope my fps is on fine 50. Tested this on both vanilla and custom clients and on several computers. Simlpy clicking on the objects while moving won't work, only with the prediction. Large objects such as trees or drakkars are perfeclty fine because cursor can't leave it's borders in such small period of timeboshaw wrote: A click is delayed to the start of a new mapview draw, but I could only imagine your issues if you had horrible fps.
-
Granger
- Posts: 9255
- Joined: Mon Mar 22, 2010 2:00 pm
Re: Broken raycasting
Boshaw is right, which you can check when you look at the client code.ghozzd wrote:Nope my fps is on fine 50. Tested this on both vanilla and custom clients and on several computers. Simlpy clicking on the objects while moving won't work, only with the prediction. Large objects such as trees or drakkars are perfeclty fine because cursor can't leave it's borders in such small period of timeboshaw wrote:A click is delayed to the start of a new mapview draw
Also the click checks if you actually hit the graphics of the object, dragonflies are hard to click because they're small.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
-
ghozzd
- Posts: 30
- Joined: Thu Jul 11, 2013 6:21 pm
Re: Broken raycasting
Yes i said about it, and considering the topic subject, this doubles the problem. Catching dragonflies is already bad as they're moving like mad, so CLICKING them shoulnd't be problem. Also it bad for such things as mussles and other that have a lot of holes in graphic. That shouldn't work like this. Hitboxes are fine for great amount of models and spheres are fine for others. I am not playing Mafia I for dealing with recoil, i'm just trying to click damn chest while not wasting time for staying still to aimin it with mouse.Granger wrote: Also the click checks if you actually hit the graphics of the object, dragonflies are hard to click because they're small.