Author Topic: Exposed Rotation not working in Unity  (Read 3348 times)

Hey Guys,

      I wanted to expose the rotation & scale from Transform 2D node to Unity.
Now the scale is successfully working with a single slider for both X & Y but the rotation doesn't seem to work in Unity, it does however work within Substance Designer & Marmoset Toolbag.

The connection I have is attached below as a screenshot.

Can some please guide me on how to correctly expose the rotation parameter for use in Unity?

Thanks,

Regards
-G
Last Edit: April 28, 2016, 09:38:11 pm

Hey Guys,

      I wanted to expose the rotation & scale from Transform 2D node to Unity.
Now the scale is successfully working with a single slider for both X & Y but the rotation doesn't seem to work in Unity, it does however work within Substance Designer & Marmoset Toolbag.

The connection I have is attached below as a screenshot.

Can some please guide me on how to correctly expose the rotation parameter for use in Unity?

Thanks,

Regards
-G

Hi,

The best option is to use the rotationMatrix node. You can feed in the float parameter to the rotationMatrix and then set the rotationMatrix node as output.

Here is a sample sbs file.
https://www.dropbox.com/s/azxht1g5wdjwbwe/rotationMatrix.sbs?dl=0

Cheers,

Wes
Last Edit: April 28, 2016, 10:13:53 pm
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Awesome.
Thanks a lot Wes.

Hey Wes,

    When publishing the .sbsar from the .sbs you shared with Unity is detecting the rotation. But combined with scale it is not working. Scale works but not rotation. Do I create a switch node in the function for this?

The immediate and dirty solution I did, is to make two different transform2d node. One to scale and one to rotate.


Thanks
Last Edit: April 29, 2016, 06:44:46 am

Hey Wes,

    When publishing the .sbsar from the .sbs you shared with Unity is detecting the rotation. But combined with scale it is not working. Scale works but not rotation. Do I create a switch node in the function for this?

The immediate and dirty solution I did, is to make two different transform2d node. One to scale and one to rotate.


Thanks

Hi Govind,

It should work using the matrix multiply. I attached a new example that works in Unity. The one thing I changed was adding a linear interpolation so that a slider value of 0-1 will equate to 0-100. The scale needs to work at 0-100. You could set the slider to be the 0-100 range as well.

Cheers,

Wes

 
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Thanks again Wes,

     I did try it and it still gives me no results in Unity on rotation for the sbsar I want it to happen on.

However, when I created a brand new file with a simple shape, rotation & scale did work inside of Unity, did the same thing with Matrix multiply.

Hence, I removed all the game related images from the multi-switch node and added shape nodes, so I can share it safetly. And I have attached it here - on this sbs file the rotation isn't working even though I did what you asked me to and followed all the necessary tips.

I am really not able to pin point where I might be going wrong.

Thanks a lot.
-G