playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Toggle Between two rotations using Set Rotation
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Toggle Between two rotations using Set Rotation (Read 723 times)
Ghettokon
Playmaker Newbie
Posts: 8
Toggle Between two rotations using Set Rotation
«
on:
March 24, 2021, 08:39:42 PM »
Hi all,
I am trying to toggle the switch between 2 rotations (X angle = -50 and -130) using Set Rotation every 3 secs. However, it seems the angle is not being updated correctly. Here is a video of it. What did I do wrong?
I am using Unity:Unity2019.3.6f1, PlayMaker:1.9.0.p20
//www.youtube.com/watch?v=tu3j6KfeK4k
Thanks for your time,
Best,
«
Last Edit: March 24, 2021, 09:23:59 PM by Ghettokon
»
Logged
Ghettokon
Playmaker Newbie
Posts: 8
Re: Toggle Between two rotations using Set Rotation
«
Reply #1 on:
March 24, 2021, 09:19:59 PM »
I set values for XAngle, YAngle, and ZAngle instead of leaving Y and Z to None. This way it works correctly. I then open the Set Rotation script and did a few Debug.Logs and found out when I left Y and Z to none before, my YAngle is toggling between 0 and 180 (or 90 and 270) somehow, and that caused Xangle updates not being persistent. Did I miss a setting somewhere?
«
Last Edit: March 24, 2021, 09:22:34 PM by Ghettokon
»
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Toggle Between two rotations using Set Rotation
«
Reply #2 on:
March 25, 2021, 07:46:54 AM »
Hi.
I'm not sure why its doing this but you should try setting the switch object inside a empty parent and then rotate the parent and make sure the parent scale is 1,1,1
Logged
Join the PlayMaker Discord Channel!
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Toggle Between two rotations using Set Rotation