Bolt Entity Child Objects Transforms/Parenting

Options
Hello,

hope someone can help maybe. Right now I'm trying to get Bolt integrated and going through the tutorials. Unfortunately I can't seem to find much of children of an Bolt Prefab. At the moment I have a working Player Model with animations with an attached melee weapon. The weapon is visible in a slot and can be drawn by animation which is fine and works for the local player. Now I know there's the example of an Array for all the weapons but this won't help me to attach it to a different Slot and I can't imagine that sending the transform all the time would be a good solution or using a Bolt Entity as it's a child object of another Entity. So is there any good way I miss, where I can just send a one time update in my equip/unequip function ? Basically the weapon is attached to bone and moved by animations so I think using transforms all the time might cause problems. It's more to be done than just one weapon and with additional clothing changes I need to update once in a while I think running a additional ~15 network entities on each player would be no good solution. But I can't seem to find a good information how to just send a one time Update or let the network Entity watch it's children's changes as well.

So if someone can help a bit that would be great.

Thank you ;-)

Comments

  • stanchion
    Options
    Entities should never have a parent. If an entity has weapons, clothes, etc, that should be represented in its state, not another entity for each. For a weapon for example you should have a callback that removes the current weapon from the player's gameobject and add the new one as the correct bone.
  • Ivendar
    Options
    Ah I see. Have not yet looked into Callbacks so will do. Was still at "Advanced Tutorials" not yet at "in Depth". Unfortunately not so many other tutorials/examples out there. But do I have to remove and add it every time or is there a way to just send a refresh callback ? Also do I have to create a Bolt Object for every piece of clothing / melee weapon or is there a way to use those callbacks to work around it. By having separate clothing for head, torso, legs and the like those list would become very large if doing like in the weapons example, as this seems to be focused on shooter with a more limited weapon choice. But having just like 10 different helmets, 10 gauntlets, and so on it will grow rapidly, same with weapons.

    If there's any good tutorial with such behavior I might have missed, this would of course be appreciated.
  • stanchion
    Options
    I'm not sure what you mean by refresh callback, or why you would use a Bolt Object.
  • Ivendar
    Options
    Well Bolt object is used in the official tutorial but it's also about weapons having all same weapon slot
    https://doc.photonengine.com/en-us/bolt/current/getting-started/bolt-104-objects-and-arrays
    Refresh callback. Well you propably know how refresh in Browser or elsewhere work, you hit refresh and get the actual information of current site or whatever. So question is if there is a command where I can do a check or send the actual informations just once and not on every update.