Mirror transform matrix to another object? How?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello,

    Is there a way to mirror transform matrix parameters from one object to another one? What i mean exactly by that is, in my example i have a purple object that rotates, and now i want to apply a warp(scale) only on horizontal. I kind of want to apply the scale matrix of the blue object to the purple object but the purple object should still rotate of course. But like its now you can see the warp also rotates.
    How can i solve it? Thx.

  • [MENTION=14672]aenever[/MENTION] rotate only the line is not possible because than it would not scale/warp. I have added an example of why i need it, i want to make a wobbling physics ball with the behavior as explained above. Basically my plan was to make a physicsObj, spriteObj and warpObj. Now i set the position and rotation of the spriteObj to match the physicsObj, and the scale of the spriteObj to match the warpObj / or i could also apply the warp directly to the sprite with world space transform so that the warp is NOT rotating.
    But i can just not see a way to transform an object relative to world tansform or parent transform, its always local.
    Warp with shader is also not possible because there is no support for it on mobile ...

  • I know how to rotate something around a point in worldspace. Please login to see this link.explains it fairly well. Though if I remember correctly, the final equation is actually a lot simpler in Fusion than he presents it in that article. Though I can't remember what the equation is off the top of my head.

    But I don't know how to scale it relative to a worldspace point. I suspect that with some determination you could probably 'fake it' by combining both scaling and positioning. For example, if the ball is falling straight down, and its hotspot is in the centre, then scaling won't be enough since the ball will float in mid-air as the left ball in the picture does. But if you simultaneously move the ball by X amount (which is just the distance between the bottom edge of the ball and the ground, shown as Y...........but you'd be able to calculate it without referencing the ground too - probably something like (ball's original height minus ball's current height) * 0.5 )? then it should look ok, with the ball still touching the ground, as the right ball does. As long as you apply this movement at the same rate as you apply the scaling, it should work ok.

    To make it bounce off a wall, you'd obviously move it along the X axis, not the Y axis. If you wanted to combine the two for some squashing that wasn't just 90 degrees vertical or 90 degrees horizontal, you could probably use trigonometry to figure it out. But that might actually be unecessary, as it might look realistic enough with just up/down squashing or left/right squashing. Just sharing some quick thoughts I had - sorry if it's not helpful.

    Please login to see this picture.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited 6 times, last by Volnaiskra (July 31, 2019 at 12:58 PM).

  • Ok the code in the article i make it now but it will also not help me. I mean the physicsBallWobble example is what i want and there is nothing to fake because the rotation and position of the sprite is always controlled by the physics engine. Only the scale is set by me, i would just need a way to pass a scale value to the sprite object relative to world orientation and not local orientation.

    I tried also scale the layer where the object is on but i dont see how to do it !!
    I also thought about mesh/sprite deformation but how to do it !!

  • there is nothing to fake because the rotation and position of the sprite is always controlled by the physics engine. Only the scale is set by me, i would just need a way to pass a scale value to the sprite object relative to world orientation and not local orientation.

    You can always add additional movement on top of whatever the physics engine does. Here's a very quick-and-dirty example where I added some extra Y movement to the ball based on its current scale. It helps it look like it makes better contact with the ground. It's far from the finished effect you would want - you'd still need to fine-tune how it works, plus add in a separate mechanism for X movement, plus use some clever maths to adjust for the ball's current angle. But I'm sure it's possible.

    EDIT: Sorry, I think I finally properly understood what you want. As you said, you want to rotate the ball while the scaling continues in a vertical direction, ignoring the rotation. Hmm... not sure how you could do that. My MFA won't solve your problem, but I think it may at least help you mask the problem somewhat. If you re-enable the rotation in the MFA I think it looks a bit better than before.

    For a proper solution, maybe you'd need a shader? Or else ask Yves very nicely to implement a way to change hotspots at runtime? X)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!