HOW TO: Weld a tag group's members to a hub in gravity?

  • Objects like a bladed propeller. Some of the objects have physics interactions with elements of the world. Most of them are just decoration and visual adornments. Normally they'd be walls or scenery. But they all need to rotate with the hub. So they need to be welded to the hub, and then (all of them) changed into physics objects so they rotate with the hub, when it is rotated.

    However... from a third party with the code, using tags, this seems to be impossible.

    What's the right/correct and working way to achieve this in a world with gravity, such that as they're connected, these items don't lose their relative position to the hub as they're converted to physics objects.

  • @Deeeds if the hub is stationary, you could give the objects really high air resistance and then attach and change the air resistance back?
    But making them physics and then attaching shouldn’t let them move much at all.

  • @iTap-Development I can't even get a group of tagged objects to connect by weld to another specific object. At all. Is this possible?

  • @Deeeds you would maybe need to do a for each

  • @iTap-Development Yes, I've tried this. It doesn't work. For Each tag and Weld don't seem compatible because the Weld behaviour is restrictively the "wrong way round".

  • @Deeeds huh...I’ll try it in a little bit

  • @Deeeds Are these objects being spawned or something? I’m going to guess yes, because otherwise it would be really easy if I’m understanding this right. Which object has the tag, the hub or the propeller blades?

  • Lol, here’s my propeller: don’t forget to press the centre to make it spin!
    But I must be missing something, because this was really easy to make.

  • Lol now I’m just having fun with physics.

  • @Aidan-Oxley Did you use a 3rd party to create the joints?

    I can't get your project to get past 100% loading...

  • @Aidan-Oxley Yes, you have missed something. You aren't using a third party to create the joints. You're doing it within the hub.

    I specifically said that the problem is in third party creation of this relationship.

    eg. Three types of objects:

    A Hub

    The Blades

    A Factory

    The Factory attempts to create joints between blades and the hub. This is where I'm having the problem.

  • @Deeeds There is no way to weld attach (or any attach) two objects in a tag from an outside object. Using tags, one of the objects being connected must have the behaviour inside itself.

  • @Aidan-Oxley Thank you!!!

    A forthright negative is very helpful!!!

  • @Deeeds You can half do it. The outside object would have to select one definite object that does not change, and the other being a tag. But I’m pretty sure this isn’t what you want.

  • @Aidan-Oxley This has a bug.

    The resultant connection (when using Weld) is very weak, like a spring. So much so that it's very similar to how a soft body rig might be setup. Not in a good way.

  • @Deeeds Yep. I want a solid physics attach too, one that doesn’t allow for any springyness at all. Like gluing and nailing two objects together. Make sure your two objects being welded have similar masses, it helps a bit. And high physics refresh rate etc.

  • @Aidan-Oxley The best way to get solid welds, I've found, is all that you're saying, but for a couple of things:

    1. use zero mass in the slave/child objects

    2. Connect from slave/child to the parent. Not the other way around.

    In other words, the inverse of what you've done in your example files.

    Where you have connected from the parent to the children, and used massive mass in the "blades".

  • @Deeeds All of the propeller has massive mass, all of them having the same mass. When any of them are set to zero, it all goes mushy.

  • @Aidan-Oxley Give the blades zero mass. They don't need any mass. They inherit sufficient mass from the hub.

    Then connect the other way around, from blades to hub. It will be tighter/stronger welds. Still not perfect, but better.

  • @Aidan-Oxley

    I had an idea to rotate all members of a tag, around a manually created anchor point. But came across a strange bug.

    in the green object, try selecting the isolated rotate by1 behaviour

    It crashes, for me... every single time I select this behaviour...

Log in to reply

Looks like your connection to hyperPad Forum was lost, please wait while we try to reconnect.