Jump to content

Structure detaching from boat at high speed


Cuikui
  • Fixed

As many have already pointed out, structures can become detached from the boat when sailing at high speed. I wanted to share with you my thoughts on this problem.

In "components/walkableplatform.lua" the function "CollectEntitiesOnPlatform" is supposed to capture all objects to move them with the boat. The part in lines 155-158 collects the objects at the new location. The part on lines 160 - 178 collects the objects at the previous position.

The problem is that the test on line 167 "not entity.entity:GetParent() == nil" is wrong for most objects (few objects have a parent). Thus, the objects are not collected at the previous position and only at the new position. At high speed, objects close to the boundary can escape from CollectEntitiesOnPlatform and thus detach themselves.

Should "not entity.entity:GetParent() == nil" just be "entity.entity:GetParent() == nil" or "not entity.entity:GetParent()" ?


Steps to Reproduce

You can reproduce the problem by manually moving the boat.

boat = c_find("boat")
x, y, z = boat.Transform:GetWorldPosition(); boat.Transform:SetPosition(x, y, z + 10)

 

  • Like 3



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...