Parenting BoltEntities & entity.SetParent() in Bolt

Options
Hello guys,

i want to make this thread in order to have a guide or help on the issue of parenting one BoltEntity to another.

Right now there is "entity.SetParent(BoltEntity newParentEntity)". This caused some problems in the past and it should be fixed in the current version (v.0.4.3.7)

When using entity.SetParent() though there is a delay in the movement of the child object. This goes in both directions.
Case 1: When my controlled unit is the parent of a server synched entity, there is a delay in the movement of the server entity. This might be caused by the fact that only the server moves the entity and any local parentrelated movement is overwritten by the last known server position.

Case 2: When my controlled units is parented to a server synced entity and the server unit moves, the movement is jittery on my side. This might be caused by the fact that the server always corrects the movement regarding to his own local parenting movement.

How would you set up a working parenting solution with bolt? I have made some tests and a test scene. Results are listed above.

Comments

  • I wouldnt use entity.SetParent for now, it still has some problems that will be fixed soon
  • T_Schm
    T_Schm
    edited September 2015
    Options
    stanchion said:

    I wouldnt use entity.SetParent for now, it still has some problems that will be fixed soon

    That's a bummer. The feature is missing and broken since several versions over the last couple of MONTHS. Is there a EST for it?

    If the native entity.SetParent() isn't working what design should be used instead?
  • You can send entities via an event, child and parent etc.
  • T_Schm
    Options

    You can send entities via an event, child and parent etc.

    This would not help the fact that the entities are corrected anyway. If the server is parented it still sticks to its replicated (delayed) position. If the client itself is parented, predictions are more complicated to do.
  • vlab22
    Options
    Same problem here.
    Ps: And if child entity doesn't has state.SetTransform, SetParent will not work. Not useful not use SetTransform, but I got that in my tests.