We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Track To constraint issue

Home Forums General Questions Track To constraint issue

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #64749
    David Duperron
    Customer

    Hi,
    I have an issue with a “track to” constraint that does not behave the same in Blender and Verge3D exported gltf.
    I added constraints to a “piston” with “track to” constraints in blender, and used the “Target Z” option, together with empty targets in order to avoid my parts flipping around their axis when the whole assembly rotates (when the object local Y axis starts to point downward, the constraint forces it to point upward, and then rotates the whole object around the Z axis).
    It works perfectly in blender but for some reason it does not translate in the verge3D world.
    Is there a known limitation for these constraints? any way to get around this?
    Thanks for the help

    David

    #64757
    xeon
    Customer

    I believe “Track To” is a legacy constraint and is prone to not working properly as declared in Blender documentation. You may want to try Locked Track.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #64758
    kdv
    Participant

    Just remember that the Blender’s coirdinate system is Z-Up-right, but the Verge3D’s native coordinate system is Y-Up-right…

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #64776
    David Duperron
    Customer

    Hi!
    Thanks for the answers.
    I juste tried the “Locked Track” constraints, whch again works well within Blender but does not in Verge3D…
    see capture below:

    The x axis of the piston is the “locked axis”, but then when I rotate the crane around its z axis, the piston x axis remains the same and does not rotate together with the crane as it should be…
    Any idea?? please help!!

    David

    #64791
    xeon
    Customer

    Here is a link to a sample file using the “locked to” constraint for a simplified object that might meet your requirements.

    Online demo – https://v3d.net/l93

    ZIP – Project File including Blend file.
    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:f2f27a4091/TEST_LOCK_TO_CONSTRAINT.zip

    Drag the sphere around to rotate the objects.

    You probably already know but in case others are having issues:
    – be sure your “origin” for the object(s) you are wanting to rotate is located at the desired rotation axis point.
    – “apply transforms” (position, rotation and scale) to all your objects and to the target object you are tracking. Its not an issue in Blender but it solves many of the problems people have when sending this over to V3D.

    In this example: the tracking axis is Y and the locked axis is Z. You could use X as well but Z is the axis that I am rotating around so that is the “locked axis”. Its probably the same in your scene with Z up unless you have changed your coordinate system.

    Hope this helps.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #64795
    kdv
    Participant

    Is it really necessary to use constraints in this case instead of just parenting one object to another one? The “Track to” constraint is mainly used to force one object to look at some other object along its local +Z axis (-Y in Blender) by default. Once again: to look at. Not copying rotation or something else, just looking at.

    • This reply was modified 10 months, 4 weeks ago by kdv.
    • This reply was modified 10 months, 4 weeks ago by kdv.

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #64884
    David Duperron
    Customer

    Thanks for the help and demo files, but unfortunately I think my issue is a little more complicated than this… in fatc there are several movements in action there: the crane boom and tips are moving, and the pistons shall follow their respective attachment points on the crane AND point towards each other (piston/cylinder pointing toward each other).
    The problem is that when the crane rises almost vertical, the piston Y axis is no more pointing upward (vs World Z axis) but slightly downward, and to keep “Y Up”, Verge3D flips the piston around its Z axis 180degrees…
    See illustrations below, in Blender which does not flip the piston and let it point downward.

    #64896
    xeon
    Customer

    If you could export the offending parts to a separate blend file and share I will take a look.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #64897
    xeon
    Customer

    Before you do make sure all the parts have their origin in a good place and scale and rotation are applied

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.