playMaker

Author Topic: Tween Rotation Not Working  (Read 11780 times)

cjswanson1355

  • Playmaker Newbie
  • *
  • Posts: 6
Tween Rotation Not Working
« on: September 29, 2021, 07:53:49 PM »
I am trying to use Tween Rotation to open up a door. This should be super easy....but this software is making it impossible. When the player enters the trigger area, the door opens, and then immediately closes. I have been fighting with this for a couple days and I cannot for the life of me figure it out.

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: Tween Rotation Not Working
« Reply #1 on: September 30, 2021, 09:07:18 AM »
First of all a little reminder : The software is 99% of time not at fault but the way it is used.

I set up what you described in a test scene with a simple door, a trigger and a collider. Tweening is setup like in your screenshot, same action. The door opens and stays open. So either your rotation variables are wrong or you have something resetting the door right after it has finished rotating.

What are you doing after the Tween Rotate ? Are you transitioning to another state ? If nothing works : Please attach the scene in a demo project so we can take a look at it.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Tween Rotation Not Working
« Reply #2 on: September 30, 2021, 10:52:05 AM »
Hi.
On the bottom of you image you can see 'Debug'
Turn that on so you can see the values, it will help debugging issues.

cjswanson1355

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Tween Rotation Not Working
« Reply #3 on: October 01, 2021, 08:57:21 PM »
Still trying to figure this out. If I use GET rotation and then do SET rotation on the trigger....the door opens and then closes right away. Very confusing.

If I just put in a static value of 90 for the rotation, then doors on the X Axis work properly, but not doors on the Y Axis. So is there a way to check a doors orientation and do the opening?

I just want to GET the doors original position...and then SET it to open 90 degrees....

« Last Edit: October 01, 2021, 08:59:30 PM by cjswanson1355 »

cjswanson1355

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Tween Rotation Not Working
« Reply #4 on: October 01, 2021, 09:39:45 PM »
I also tried setting up an animator controller on the doors, and ran into a similiar issue where doors on the X axis work fine while doors on the Y axis are not functioning correctly.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Tween Rotation Not Working
« Reply #5 on: October 02, 2021, 07:32:53 AM »
Hi.
For Single Axis its better to use a tween float with a set rotation.

Store the float result in a variable and use it on the set rotation to the axis you need.
and set it every frame.

cjswanson1355

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Tween Rotation Not Working
« Reply #6 on: October 02, 2021, 02:07:54 PM »
Now the doors don't move at all...I'm so frustrated right now.

All i want is for the door to open 90 degrees when the character gets close, regardless of the axis. And then close afterwards. Should I give up on playmaker? This simple task should be so damn hard to do.

Microck

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Tween Rotation Not Working
« Reply #7 on: October 02, 2021, 02:22:20 PM »
Hi !
In your set rotation action, set euler angles to None (let just the Y angle) and finally set it to every frame.
Use Tween float action for your Y angle, not tween rotation.

Does that works for you ?
« Last Edit: October 02, 2021, 02:25:39 PM by Microck »

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: Tween Rotation Not Working
« Reply #8 on: October 02, 2021, 08:38:35 PM »
Sorry to be this rude but you should probably give up on playmaker. Blaming the software is just really not that smart. The logic is very simple, I have tested everything you described in very simple test scenes and had no issues whatsoever.

Maybe you should read up on gamedev or do some very generic 3D tutorials first ? If you want a door that opens when the players gets near and closes once he or she has gone through it : there are 2 trigger zones involved, as long as the player is in the trigger in front of the door it opens and stays open (hint: onTriggerEnter and onTriggerExit) and once the player goes through the door (hint:new trigger enter) it closes. If you need the player to go back you need to figure out enter and exit direction which is easy as well.

Blame you and your lacking knowledge of 3D development but not playmaker. Playmaker is perfectly capable of solving that task.

cjswanson1355

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Tween Rotation Not Working
« Reply #9 on: October 02, 2021, 09:59:13 PM »
Sorry to be this rude but you should probably give up on playmaker. Blaming the software is just really not that smart. The logic is very simple, I have tested everything you described in very simple test scenes and had no issues whatsoever.

Maybe you should read up on gamedev or do some very generic 3D tutorials first ? If you want a door that opens when the players gets near and closes once he or she has gone through it : there are 2 trigger zones involved, as long as the player is in the trigger in front of the door it opens and stays open (hint: onTriggerEnter and onTriggerExit) and once the player goes through the door (hint:new trigger enter) it closes. If you need the player to go back you need to figure out enter and exit direction which is easy as well.

Blame you and your lacking knowledge of 3D development but not playmaker. Playmaker is perfectly capable of solving that task.

Wow, you're an ass. I know how to use triggers and i know how to do a basic rotation. Setting up a strawman in a test environment and then attack me is rude. I'm obviously here because a simple problem is not able to be solved.

I tried setting up tween float and set rotation, but now the doors don't rotate at all. I have used these for features such as movement, but it doesn't work here.....


Is there assets I can purchase that have this functionality out of the box? I'm spending all of my time trying to solve this menial task.

Microck

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Tween Rotation Not Working
« Reply #10 on: October 03, 2021, 06:21:35 AM »
Hi !
It doesn't rotate because your Open variable is already set to 90.
So you're asking to do (open) 90 to 90, that's why it doesn't rotate.
Open variable need to be set to 0 first.

I've also made a screen of a simple working rotation door. Rotate the gameobject "pivot" Y angle and make the door as a child. (see attachments).
« Last Edit: October 03, 2021, 06:39:02 AM by Microck »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Tween Rotation Not Working
« Reply #11 on: October 03, 2021, 08:00:58 AM »
Hi.
On the Tween action you can also change the 'from type'
to Value.
So you can set a tween from value 0 to value 90 and one from value 90 to value 0.

Quote
Should I give up on playmaker? This simple task should be so damn hard to do.
Any kind of software has a learning curve and even simple thing can be hard sometimes at the beginning.

Quote
Is there assets I can purchase that have this functionality out of the box? I'm spending all of my time trying to solve this menial task.
Playmaker and its actions work out of the box fine (it already exists more than 10 years and have been battle tested a lot) , its just the way to setup that you need to  know how to do correctly.
Making this kind of comments will not help you.

Be patient and look to it step by step.
The forum is here to help and there are always people here to help out

You can also join the playmaker discord server where you can ask help as well

cjswanson1355

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Tween Rotation Not Working
« Reply #12 on: October 03, 2021, 04:21:36 PM »
Hi !
It doesn't rotate because your Open variable is already set to 90.
So you're asking to do (open) 90 to 90, that's why it doesn't rotate.
Open variable need to be set to 0 first.

I've also made a screen of a simple working rotation door. Rotate the gameobject "pivot" Y angle and make the door as a child. (see attachments).

Thank you very much for your help. I tried this approach and was finally able to get it to work. I did some additional math as well and the doors work from any angle now. I had to remove the animator component which was causing some issues with the math.

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: Tween Rotation Not Working
« Reply #13 on: October 06, 2021, 06:32:24 AM »
Quote from: cjswanson1355 link=topic=24279.msg105565#msg105565

Wow, you're an ass. I know how to use triggers and i know how to do a basic rotation. Setting up a strawman in a test environment and then attack me is rude. I'm obviously here because a simple problem is not able to be solved.


It is not a strawman in a test environment. It is a working door opening using the exact same method you described, having it working - as you said - out of the box. If you knew how to use triggers and simple rotations your door would work, just saying. Maybe be a bit humble and willing to learn instead of ranting about how frustrated you get.

My comment might have been a bit rude, sorry for that, but your attitude coming in here like:

"my super simple door logic is not working, i hate this software, its playmakers fault"

triggered my reaction. Sorry for that.

nanalyly

  • Playmaker Newbie
  • *
  • Posts: 1
    • Ragdoll Hit
Re: Tween Rotation Not Working
« Reply #14 on: April 21, 2025, 03:12:14 AM »
These actions are more stable and support advanced tweening. Alternatively, check if your PlayMaker version supports DOTween natively or update to the latest PlayMaker version.