Broken raycasting

The worst monsters in the Hearthlands warp the fabric of space and time...

Broken raycasting

Postby ghozzd » Sat Jun 04, 2016 7:15 pm

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.
ghozzd
 
Posts: 30
Joined: Thu Jul 11, 2013 6:21 pm

Re: Broken raycasting

Postby MagicManICT » Sat Jun 04, 2016 7:23 pm

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.
User avatar
MagicManICT
 
Posts: 18436
Joined: Tue Aug 17, 2010 1:47 am

Re: Broken raycasting

Postby ghozzd » Sat Jun 04, 2016 7:26 pm

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.


Never noticed it in W7. Also i personally think that such thing as raycasting shoud be client-based and not server-based.
ghozzd
 
Posts: 30
Joined: Thu Jul 11, 2013 6:21 pm

Re: Broken raycasting

Postby boshaw » Sat Jun 04, 2016 7:44 pm

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.


A click is delayed to the start of a new mapview draw, but I could only imagine your issues if you had horrible fps.
User avatar
boshaw
 
Posts: 1590
Joined: Tue Jun 01, 2010 10:22 pm

Re: Broken raycasting

Postby Granger » Sat Jun 04, 2016 7:48 pm

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.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9264
Joined: Mon Mar 22, 2010 2:00 pm

Re: Broken raycasting

Postby ghozzd » Sat Jun 04, 2016 7:50 pm

boshaw 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.


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 time
ghozzd
 
Posts: 30
Joined: Thu Jul 11, 2013 6:21 pm

Re: Broken raycasting

Postby Granger » Sat Jun 04, 2016 7:57 pm

ghozzd wrote:
boshaw wrote:A click is delayed to the start of a new mapview draw


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 time

Boshaw is right, which you can check when you look at the client code.

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
User avatar
Granger
 
Posts: 9264
Joined: Mon Mar 22, 2010 2:00 pm

Re: Broken raycasting

Postby ghozzd » Sat Jun 04, 2016 8:10 pm

Granger wrote:Also the click checks if you actually hit the graphics of the object, dragonflies are hard to click because they're small.


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.
ghozzd
 
Posts: 30
Joined: Thu Jul 11, 2013 6:21 pm


Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 56 guests