(sim-eth-es) questions digest

That means only clients from origin zone and probably neighboring ones will get all necessary updates while those in other zones will get only parent entities, in theory. Well, will see. I’ll keep the point in mind, thanks.

1 Like

I guess I need some hint how to store/get parent entity data in model view…

I mean at the time of creation of Mob what I can populate it with is its parent’s EntityID (parent itself might not be received yet, right?), and then, I should (I think) add to MobContainer something sort of:

protected Position getParentPosition(EntityId parentId) {
  for ( Mob mob : mobs.getArray() ){
    if ( mob.entity.getId().equals(parentId) ){
        return // hmm.. what?
    }
  }
  return null;
}

and add that as a parameter to updateNode() call? Or should I set up some other buffer somewhere, but where then?

1 Like

Yikes.

mobs.get(parentId);

If I understand the question correctly, you will need to hook up the children to their parents… and possibly hold onto them if their parents aren’t created yet. That’s the only tricky bit but not overly tricky.

2 Likes

Right, it’s parent = mobs.getObject(parentId) and then parent.buffer.getTransition and everything is right there in updateNode(). I was looking at wrong place somehow :expressionless:

Thanks!

p.s. those who might follow will need to modify HudLabelState (if they keep it) as well.

1 Like

Why does HudLabelState need to change? That part confuses me.

1 Like

Hmm well if we translate node as

node.setLocalTranslation(trans.getPosition(time, true).add(ptrans.getPosition(time, true)))

as those broadcasted positions are all local, they will be local in LabelHudState as well.

1 Like

But isn’t it only showing things with names? Do your children also have names for some reason?

1 Like

Ah, well, yeah, if to show them for parents only, that’s not the case. I mean you might want them for children too, for debug at least (and actually this state helps for that).

1 Like