Free Rotating Object Script for Unity3D, written in C#
Feel free to change the class name from “CoinMovement” to something more useful for you like: “RotatingObjectScript”. Just make sure whenever you create a new C# script in Unity that the name of the script and the name of the class match.
Here's the code:
// CHANGE TO ROTATE IN OPPOSITE DIRECTION
// Use this for initialization
// Update is called once per frame
// Toggles X Rotation
transform.Rotate(myRotationSpeed*Time.deltaTime*posOrNeg,0,0);//rotates coin on X axis
//Debug.Log("You are rotating on the X axis");
// Toggles Y Rotation
transform.Rotate(0,myRotationSpeed*Time.deltaTime*posOrNeg,0);//rotates coin on Y axis
//Debug.Log("You are rotating on the Y axis");
// Toggles Z Rotation
transform.Rotate(0,0,myRotationSpeed*Time.deltaTime*posOrNeg);//rotates coin on Z axis
//Debug.Log("You are rotating on the Z axis");
Here’s a demonstration of what it does and how to use it :
“Visual scripting is a cool idea, but It’s not bread and butter yet.” – Me
-Please view my previous post on this topic, the day I got playMaker.-
I recently picked up playMaker and wanted to show my thoughts about it on here.
I believe It is a cool idea, but it is not simple enough…yet.
(I hope someone will tend to non-programmers desires and try and make it even more simple)
You still have to learn all the things Unity can do…(there’s no simplified naming convention)-AKA: “Syntax” Which to me, defeats the purpose of visual scripting. I want it to be easy and look sexy.(PS: don’t judge my blog by It’s looks, I am working on a solution to make it look pretty. -stay tuned:P)
It’s visually appealing, but It’s not quite there.
There’s still a bunch of confusing things such as FSM, States, Events, and Variables.
Personally, I would just want basic english for the names, such as (MOVE)- and then you select the axis to what direction the object moves. And then another plugin could be (SPEED) and you adjust the speed the object moves etc.
So You basically have to spend Just as much time learning how to use the Visual Scripting editor to even do anything.
Now, the visual Editor might save you a week or two, but is it really not worth it when it teaches you very little about actual type scripting.
It’s been a long and difficult journey to try and learn scripting in Unity all while trying to manage school work and do chores etc.
…So I have finally fallen into the idea of VisualScripting (link to hutong’s website, the creators of playMaker.)
In the past, I have always viewed visual scripting as “cheating”, and I wouldn’t learn much from it, but now, after reading self help books and gaining more knowledge through life experiences I have come to the conclusion that you should take advantage of all the tools at hand!
Use your assets!
If you have software that speeds up a certain process, then use it! There’s no point in re-inventing the wheel.
Yes, playMaker might cost $45 dollars, but think about the worth you are getting in comparison for the time it would take to learn a whole scripting language.
Say it takes you a good year to learn scripting with zero money spent, well that’s a whole year that you could’ve used to actually work on your game.
So now that you’ve learned scripting you need to get started on your game, let’s say it takes one more year to make your game (that’s two years development.)
When if you used VisualScripting, the coding portion might take a few weeks or months to setup.
You could finish your game in a year or so, depending on how diligently you work and afterwards you can use that extra time to actually work on promoting and selling your game to gain revenue($$$).
“Time is money, so I bought a Rolex!”-Wiz Khalifah