Recent Posts

Pages: [1] 2 3 ... 10
Android Help / tilt control in android without a gyroscope
« Last post by colpolstudios on Today at 06:53:20 PM »
While working on my own project I wanted to add tilt control, unfortunately, my old phone and many other types of mobile phones do not support gyroscope control. So in my example, I use the "Get Device Acceleration Action".

In this example FSM, I am able to use the action to successfully move the object within constraints moving both left and right.

Here is a screenshot of the FSM:

 The Float value within the "Float Compare" may need to be adjusted to suit your play area.

The multiplier value within the "Get Device Acceleration Action" has been set to 35 as that level feels right for me on my phone.

I couldn't quite fit the remaining part of the "Translate Position 2D" action.

Within the float X movement in the axis use variable "X_tilt" with both per second and every frame checked.

In order to actually test this, you will need to have your project set as "Andriod build" and use "Unity Remote".

When played on your device, hold the phone upright, now tilt left and right to move the object.

The object will move left or right and stop according to the stop values.

My issue is that I am trying unsuccessfully to use the same action, but move a similar object up and down.

With my current setup, it does work; but only with the phone laying down flat.

Following feedback from a c# developer, he said "You have to calibrate the initial rotation (offset) of the phone. Otherwise, it only works when the phone is lying down flat, which is not how anyone holds their phone. So store the initial values of the tilt while in the menu, then subtract that from the input while playing.

But to be honest I am lost at this point and require your help and insight.

Kind regards


Hello @AllanLisa,

I updated the link to the game. It should be working now.
PlayMaker Help / Moving Object to Other Objects Transform
« Last post by skrrrappa on Today at 12:42:25 PM »
Hey guys, is there a simple way to get all transforms (position, rotation) from an object and set an other object's values to these transforms? (position and rotation too).

I know i can get the position and the rotation and store them in different variables, then set the other objects position/rotation to these values, but is there a way to do this with ONE action instead of 4?

Thanks guys! Have a nice day!
PlayMaker Help / Re: How to Save
« Last post by misterjuly on July 30, 2021, 08:16:07 PM »
I think I figured it out. Thanks for your help!
PlayMaker Help / Re: Rotating Issue
« Last post by misterjuly on July 30, 2021, 08:15:17 PM »
PlayMaker Help / Re: How to have a game object destroyed when I reload a scene
« Last post by misterjuly on July 30, 2021, 08:12:46 PM »
I think I figured it out. Thanks SO MUCH for your help!
PlayMaker Help / Re: Increment String value on each click
« Last post by djaydino on July 30, 2021, 02:53:22 PM »
The Reset Flag should be set true before the loop, else it will always get the first index if its done within the loop.

Maybe you can show your setup (some pictures or short video)
PlayMaker Help / Re: Increment String value on each click
« Last post by Rajeev on July 30, 2021, 12:36:34 PM »
Hello djaydino Sir,

Thank you very much for pointing me towards the Array Get Next action. It took some time in replying since I wanted to implement the action in my FSM requirement and check that it fully worked and achieved what I needed. Glad to inform that it works like a charm and has helped me a lot.

I ran into one issue during the trial. There is a scenario in my project where a user can start a new Play and the Array Get Next action would have to reiterate from start. I was unable to get the Reset Flag function of the action work properly no matter what I tried.
I was ready to run back here and shout for help, but thought of searching the forum to check if anybody else faced the same problem, and I came across the Array Get Next 2 action on the EcoSystem. This action has solved my requirement completely. So, thank you very much once again.

I am now setting the Reset Flag to true in the FSM that runs when on click of the "New Play" button, and have set a state with the 'Set Bool value" Math action just after the state holding the Array Get Next 2 action to reset the bool. This does the job but doesn't seem right since the bool is reset unnecessarily about 20 times without serving any purpose.

I thought of using the Simple Loop Counter action to run the state once, but it seems like an overkill just to reset one bool. Could you please advise me on how to go about this correctly?

Thanks and Warm Regards
PlayMaker Help / Re: Dynamically change FSM throughout Prefabs
« Last post by Christoph on July 30, 2021, 10:48:23 AM »
No, what's it for?
PlayMaker Help / Re: FSM Variable Output <SOLVED>
« Last post by Christoph on July 30, 2021, 10:47:45 AM »
Is the new documentation already available? I'm trying to understand both, templates and inputs/outputs. I'm trying to have one FSM on hundreds of level prefabs that use individual variables (in a c# script it would be a public variable).

Do I do this with templates and inputs variables?
Pages: [1] 2 3 ... 10