playMaker

Author Topic: RotateAround  (Read 15698 times)

Joe64

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: RotateAround
« Reply #15 on: February 01, 2014, 11:39:43 AM »
Hi,

useful action and nice feature "Stop Angle"!
I've played around with it and I think I found an issue. When you use negative values for stopAngle in order to rotate counter clockwise then it will never stop.
The line
Code: [Select]
rotatedAngle.Value += _angle;should read
Code: [Select]
rotatedAngle.Value += Mathf.Abs(_angle);Or is there another way to rotate counter clockwise? At least this worked for me.

Also a small question: Sometimes there's no file to download for a new shared action. Am I supposed to copy the code and create a .cs file or is there another trick? (I'm new to this forum, as you can see  ;) ). Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14014
  • Official Playmaker Support
    • View Profile
Re: RotateAround
« Reply #16 on: February 03, 2014, 02:59:16 AM »
Hi,

 yes, copy the code snippet, create a c# file of the exact same name as the class defined in that code and paste it in there.

also, I always recommand that you create a special folder to host all your custom actions, like "PlayMaker Custom Actions", I go one more step as well, creating sub folders of the name of the category, so that all my custom actions are organized by categories in my project folder.


bye,

 Jean

dottim

  • Playmaker Newbie
  • *
  • Posts: 7
  • lost in space
    • View Profile
    • The Quantum Principle
Re: RotateAround
« Reply #17 on: June 07, 2014, 10:54:27 PM »
hello,

Is there a way to alter the code slightly so I can make the rotation stop when timescale is set to 0? Right now when the game is paused the rotation continues :/

tia

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3518
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: RotateAround
« Reply #18 on: June 07, 2014, 11:25:25 PM »
You could multiply your rotation angle by the current time scale. Use Get Time Info to get Time Scale and then Float Multiply.

Sjones

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Re: RotateAround
« Reply #19 on: June 13, 2014, 08:32:09 AM »
Just by chance I have just needed to make this work in real time, thanks for the hint alex, just spent some time trying to figure this out!

wrongtarget

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: RotateAround
« Reply #20 on: March 24, 2015, 07:02:55 AM »
Couldn't scripts like this be added to the Ecosystem?  :)

Nog

  • Playmaker Newbie
  • *
  • Posts: 47
    • View Profile
Re: RotateAround
« Reply #21 on: June 01, 2015, 01:00:31 PM »
Hello,

What does the Rotation Point do? Is it possible to create a rotation from which the GameObject will animate from like the Vector Rotation in the Itween Rotate action?

I am trying to get my camera to rotate around a character like a third person game. The Itween Rotate action is OK, but I wanted a bit more control over how and when the camera rotates.

Thanks,

Nog

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14014
  • Official Playmaker Support
    • View Profile
Re: RotateAround
« Reply #22 on: June 03, 2015, 12:57:54 AM »
Couldn't scripts like this be added to the Ecosystem?  :)

Hi,

 True, it's now up. Simply bump on the actions you want to see promoted to the Ecosystem, there is just too much existing actions on the forum already to go through manually :)

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14014
  • Official Playmaker Support
    • View Profile
Re: RotateAround
« Reply #23 on: June 03, 2015, 01:00:50 AM »
What does the Rotation Point do? Is it possible to create a rotation from which the GameObject will animate from like the Vector Rotation in the Itween Rotate action?


Hi

Rotation point is your "center" around which you are going to turn, ( your character in your case).

 Bye,

 Jean

Ouren

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: RotateAround
« Reply #24 on: October 16, 2015, 05:28:50 PM »
Hey Jean, the Script in the Ecosystem is not the updated one with the "Stop Angle" function.

The latest one can be found in this same thread here
http://hutonggames.com/playmakerforum/index.php?topic=1078.msg27003#msg27003

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14014
  • Official Playmaker Support
    • View Profile
Re: RotateAround
« Reply #25 on: October 27, 2015, 03:27:04 AM »
Hi,

 Ok, done, redownload please.

Do you want to host it yourself? I used my snipt account, but you can create yours if you want and then you can update it.

 Bye,

 Jean