Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: rechronicle on June 02, 2019, 09:27:19 PM

Title: It's shaking indefinitely, how to smooth it up?
Post by: rechronicle on June 02, 2019, 09:27:19 PM
Hello,
I want to make a grid-movement 2D, but the player keeps shaking even when he's on idle. What's the solution to this problem?

(See attachment.)

I try to search in the forum and found something about FixedUpdate, but can't seem to find it anywhere in the inspector.

Please help if you know anything about it.
Thank you!
Title: Re: It's shaking indefinitely, how to smooth it up?
Post by: Fat Pug Studio on June 03, 2019, 04:28:43 AM
Is he supposed to move smoothly from square to square or just change position?
Title: Re: It's shaking indefinitely, how to smooth it up?
Post by: rechronicle on June 03, 2019, 08:07:22 AM
Hello,
it's supposed to move smoothly, or at least, progressively from one grid to another. Do you know how?
I manage to make it move instantly by using Translate before.

And apparently, reducing the collider size in the 'Player Game Object' fix the shake. I think it was caused by the edge that colliding every frame.

Thanks
Title: Re: It's shaking indefinitely, how to smooth it up?
Post by: djaydino on June 03, 2019, 11:24:39 AM
Hi.
to move you can use float interpolate with a set position.

Get current position and store it in a variable, then if you need to go x +1,
do vector 3 opperator and add +1 to x and store in a different variable.
use those to move with the interpolate.
after the interpolate use set position once more, to set the exact position
Title: Re: It's shaking indefinitely, how to smooth it up?
Post by: rechronicle on June 04, 2019, 02:01:53 AM
@djaydino alright interpolate is working. I guess it can be used to many things such as 'Fade In' and 'Fade Out' effect. Thank you!

For those of you who may be wondering what I did to fix it, you can check the attachment.


Cheers,
Rechronicle
Title: Re: It's shaking indefinitely, how to smooth it up?
Post by: djaydino on June 04, 2019, 05:30:34 AM
Hi.
Yes indeed.
There are also some other interpolate actions (color,vector2,vector3)

PlayMaker is also working on tween actions