playMaker

Author Topic: Re-Set Rotation to Zero of NPC character in VR after interaction  (Read 1841 times)

SDiz

  • Playmaker Newbie
  • *
  • Posts: 5
Hello. I'm very new to Unity and Playmaker.  My issue maybe simple but I can't seem to find a step by step answer through google and tutorials.

I've been trying for 1 hour to create a machine that will wait every 10 seconds to reset the NPC game object to an upright position.

I am working on a VR app where the player can pickup and toss the creature.  I would like that if the creature is laying on the ground sideways or upside down.... that after about 10 seconds, it should transform back to original upright rotation position of Zero (x,y,z).

At the same time, I have an audio clip that plays on the game object at random intervals.  That part is working fine... but I can't seem to get the rotation to work.

Any help is appreciated.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Re-Set Rotation to Zero of NPC character in VR after interaction
« Reply #1 on: August 18, 2020, 11:07:11 AM »
Hi.
Did you try Set Rotation and Set Position?

Before it gets picked up you can also use Get Position and Get Rotation, to store its location and rotation.

So you can use that to reset the position

SDiz

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Re-Set Rotation to Zero of NPC character in VR after interaction
« Reply #2 on: August 18, 2020, 12:13:33 PM »
Hi.
Did you try Set Rotation and Set Position?

Before it gets picked up you can also use Get Position and Get Rotation, to store its location and rotation.

So you can use that to reset the position

Hi Thanks so much for answering.   I understand your suggestion and have also seen this suggestion around the web but I really don't understand how to set it up.  I've tried for several hours today and it's just not working...

Here's a photo of what I tried...


wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Re-Set Rotation to Zero of NPC character in VR after interaction
« Reply #3 on: August 18, 2020, 03:19:15 PM »
When I do this sort of thing, I make a separate 'preset' state for the START that reads the opening variables (get original rotation/position), and then FINISH out to the interactive loop – in otherwords, the interactive loop does not pass back through my START state.

SDiz

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Re-Set Rotation to Zero of NPC character in VR after interaction
« Reply #4 on: August 18, 2020, 05:07:39 PM »
When I do this sort of thing, I make a separate 'preset' state for the START that reads the opening variables (get original rotation/position), and then FINISH out to the interactive loop – in otherwords, the interactive loop does not pass back through my START state.

Thank you, I will try again.   A question:  How can I make sure that only the rotation resets to Zero after every 10 seconds of non-interaction from the player.  IF the NPC is not standing upright already.

Perhaps you know of a place where I can see a chart, video or diagram to help me understand?  i'm having a hard time understanding how to apply the appropriate variables and time intervals.

SDiz

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Re-Set Rotation to Zero of NPC character in VR after interaction
« Reply #5 on: August 20, 2020, 12:05:24 AM »
It took me many hours to create this but it still isn't working.  Can anyone give a tip how i can make this work?  Here are better screenshots of the whole system i tried creating. thanks.

Folder with Screenshots ...
https://www.dropbox.com/sh/j5yfrboaraizxsv/AAA3DQgNLV-C5Ap-Vopluquda?dl=0

« Last Edit: August 20, 2020, 12:07:16 AM by SDiz »