Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: SawyerK on January 06, 2020, 06:50:45 PM
-
Hi!
I have this basic pick up and throw FSM, but i can't seem to figure it out how to set the picked up object's rotation to the parent object's localPosition. It only has World and Self. I tried Transform direction and Inverse Transform direction, but the object just starts spinning or does nothing. Is there a way to set the rotation to the parent's localPosition, so i can rotate the object with the mouse wheel?
I stuck on this for three days now, please someone help!
(https://i.postimg.cc/Y0rRDwPw/rotate.jpg)
-
"Self" is local ;D
-
Oh and aside from Self = Local
You can do a Get Rotation action. You area already identifying the parent object some how... because you are setting an object to be it's child. Right? So do a Get Object using that same reference.
OR
If for some reason it's hard to get that reference. Another way to do it (once you have the object already a child) is to do a Get Parent on the throwing object. So yeah, once you identified that parent, do the Get Rotation.
-
With GetRotation the picked up object just starts spinning. :D
-
With GetRotation the picked up object just starts spinning. :D
You need to provide some more specific information to debug this. Start with how the parent is 'found'. Then how you add an object as it's child. Then how you do the Set Rotation.
-
Here's all of it. The FSM is on the PlayerCamera, it's a basic mouse pick event that stores the gameObject as pickedGO. Then i get the playerCamera's child the Guide and i SetParent the picked object to it. :D
(https://i.postimg.cc/3R9FPBSq/grab1.jpg)
(https://i.postimg.cc/MTzYP4DR/grab2.jpg)
(https://i.postimg.cc/mkDyRHKg/grab3.jpg)
(https://i.postimg.cc/s2YcJyps/grab4.jpg)