Graphics

 View Only
Expand all | Collapse all

auto follow and auto scale a single quad from 2 different ends

  • 1.  auto follow and auto scale a single quad from 2 different ends

    Posted 08-16-2024 05:44

    Hi guyz,

    I have 2 rectangular quads in opposite directions and in between these 2 is a 3rd quad which serves as a link between the quads (it's a thin line). i want to move the 2 rectagular quads in different X & Y positions and the 3rd quad should follow both the quads from their respective ends and also scale in X, based on the distance between quad 1 & 2. Attached is an image for better understanding. How can i achieve this thru VL? Thanks. 

    REF


    ------------------------------
    Gaurav
    ------------------------------


  • 2.  RE: auto follow and auto scale a single quad from 2 different ends

    Posted 08-16-2024 09:30

    I'd recommend VB, not VL. 

    Also, this is some simple math.

    Distance formula.

    Midpoint formula.

    VL has no asin or acos function so figuring out the angle is harder in VL. But in VB, asin for the angle.



    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------