playMaker

Author Topic: Button to rotate object 30 degrees  (Read 825 times)

DLV_user

  • Playmaker Newbie
  • *
  • Posts: 1
Button to rotate object 30 degrees
« on: July 29, 2021, 02:42:13 AM »
Good morning everyone,
first post here (it's been a while since I entered in a forum, I missed it).
Ok, so, I've got 2 buttons (one for each side of the screen) and I want that, when I click with the mouse on them, an object rotates by 30 degrees. I'm a newbie in Playmaker and I'm quite sure it's quite a simple task, but I didn't find any documentation on this action (exept something related to Ecosystems, that doesn't work somehow in my Unity, but I think I'll do another topic on that) and I'd really need it for my project.
Here's what I'm creating right now (here's an AE visualization, for now I've just realized the ring with the characters and the trigger animations). Basically 2d sprites are parented with a sphere in the center, that has to rotate 40 degrees each mouse click on button to activate the trigger to start the sprite animation. Basically a variation on ps1 Tomb Rider main menu.
https://drive.google.com/file/d/12qde_LPtoCaj6222a32vEUUi-2s0YpcS/view?usp=sharing
Thank you for your help!

CuriousRodeo

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Button to rotate object 30 degrees
« Reply #1 on: July 29, 2021, 02:53:35 PM »
I replied earlier, but took that down because it was foolishness.  Here is a far easier solution.

Create Empty Game Objects in a circle around your menu object.  1 for each position you want at stop at.

Make a State for each stop. (I would arrange them in a circle in my Playmaker Editor to mirror the positions in the top down view... if that makes sense)

Each state has the Transitions = Left and Right

Each state has your Actions to trigger the Transitions and a Look At or Smooth Look At action.  Have the object look at the Empty Game Object that is appropriate for the menu item.

I know I didn't explain that very well, but hopefully you understand what I'm getting at.