Infinite Rotation - only colliders rotating
« on: December 08, 2015, 01:57:18 PM »
Hi,
I have a parent Object called Rotor containing a few children with colldiers. I attached a Dotween Component to Rotor and set it to Rotation. The rotation is infinite and 360 Degrees. I saved the object as a prefab. When pressing play only the colliders are rotating in Edit-View, Game-View is not moving.

I created the Objects with ProBuilder.

I have been using Dotween mostly in Code, but recently found the components very handy. Is there anything I have to set up differently when using Dotween as a component?


Greetings
Habsi


*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #1 on: December 09, 2015, 10:25:18 AM »
Hi Habsi,

There should be no special setup. If the parent rotates, the children should rotate too.

I tried to replicate your setup, but everything works correctly, and if you rotate the parent with a DOTweenAnimation also all the children are rotating as they should. Can you whip up a sample project and attach it here, so I can check it out?

P.S. are you sure you didn't set some of those elements as static by mistake?

Cheers,
Daniele

Re: Infinite Rotation - only colliders rotating
« Reply #2 on: December 09, 2015, 10:35:22 AM »
Hi Daniel,

I recreated the Rotor with Unitys Primitives in parent Object. It seems that the problem is not Dotween, but Probuilder. A Probuilder Object has some additional Script Components. I can only assume that they somehow influence the tweens. The components cannot be easily removed, but I will look further into the issue and will post my findings.

Thank you for the prompt reply
Habsi

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #3 on: December 09, 2015, 10:42:47 AM »
Very curious to see what you find, also because I plan to buy Probuilder in the future and this seems a very weird issue.

Consider that a rotation tween is very straightforward: it simply changes the rotation of a transform each frame. That means that Probuilder's scripts should also be preventing you to rotate those rotors manually, when in play mode.

Cheers!

Re: Infinite Rotation - only colliders rotating
« Reply #4 on: December 10, 2015, 05:17:17 PM »
The problem is definitely on the probuilder side. While an Object ist editable in probuilder, Dotween rotation only rotates the colliders. This happened also when I moved or scaled (any transform, local and global) the Object.

There is a solution, probuilder provides functionality to remove all scripts. Then the object is no longer editable, but I can animate it with Dotween. It is an inconvenience and does not make Dotween or Probuilder any less valuable. Only the combination of them leads to a few more steps in the workflow: duplicate the probuilder model, merge/strip it of all probuilder scripts, animate. Only when you edit the original model, you have to do that again.

Greetings
Habsi

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #5 on: December 10, 2015, 07:42:02 PM »
Ah, that is very interesting, thanks for the detailed info. When you said you also tried to move or scale, you mean also manually at runtime, or only via DOTween? I'm trying to understand if, in short, Probuilder objects are all static (somehow), which would prevent them to be moved in any way at runtime, unless you make them uneditable.

Cheers,
Daniele

Re: Infinite Rotation - only colliders rotating
« Reply #6 on: December 10, 2015, 09:26:37 PM »
Ah, yes. I transformed them only via Dotween. The transform Tools work as usual. Else there would be not posibility to reasonably use probuilder :)

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #7 on: December 10, 2015, 10:50:47 PM »
Yup, but I mean if they work even while in play mode :P

Re: Infinite Rotation - only colliders rotating
« Reply #8 on: December 10, 2015, 11:20:51 PM »
Ahhh, never do anything, when you are tired :D Yes, the objects are marked as static. Moving them with the transform tools only moves the colliders!

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #9 on: December 10, 2015, 11:26:43 PM »
I am so tired too, and hungry! Ohno I want a pizza now :D

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #10 on: December 10, 2015, 11:27:47 PM »
P.S. are you sure there's no way to tell Probuilder not to mark those objects static? Maybe there's some hidden setting somewhere.

Re: Infinite Rotation - only colliders rotating
« Reply #11 on: December 10, 2015, 11:35:07 PM »
Hi Daniele,

yes, there is a hidden setting- its in the top right corner of the inspector :D:D:D:D Thanks for holding hands. I think I should go on holidays now - at least until my brain starts working again. And now I am hungry too ...

Thanks and greetings from Austria
Habsi

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Infinite Rotation - only colliders rotating
« Reply #12 on: December 10, 2015, 11:49:30 PM »
:D :D :D I thought Probuilder was taking control of that with his scripts! Well, great that we solved it, and greetings from Italy! Gonna go eat now! Though no pizza, how sad!

Re: Infinite Rotation - only colliders rotating
« Reply #13 on: December 11, 2015, 10:07:20 AM »
Probuilder sets the GOs static on creation. I will have to watch this more closely.