Don't Starve Together

Don't Starve Together

Tropical Experience | SW HAM Biomes : From Beyond
Cuikui 2024년 7월 29일 오후 3시 02분
The rafts and bamboo rafts
I answer here to the question of 好学のmomo:
"The rafts and bamboo rafts have to be three points off the ground before they can jump on. Do you know why? If you know, can you help us solve it?"

The platform is only detected at one point in front of the player, about 4 units away, but the player can only jump if close to the water.
Result: if the platform is too small when the player is close to the water, the detection point overshot the platform and it is not detected.

A solution can be to add more test points:
In locomotor line 1745 you could change to:
if other_platform == nil then
local n_steps = 3
local step = hop_distance / n_steps
for i = 1, n_steps do
destpos_x, destpos_z = forward_x * step * i + mypos_x, forward_z * step * i + mypos_z
other_platform = TheWorld.Map:GetPlatformAtPoint(destpos_x, destpos_z)
print(GetTick(), i, other_platform)
if other_platform then
break
end
end
end

I hope this helps.
< >
전체 댓글 1개 중 1~1개 표시 중
好学のmomo  [개발자] 2024년 7월 30일 오후 7시 46분 
it worked!!!
Thank you very much, friend!:steamthumbsup::steamhappy:
< >
전체 댓글 1개 중 1~1개 표시 중
페이지당 표시 개수: 1530 50