playMaker

Author Topic: It's shaking indefinitely, how to smooth it up?  (Read 162 times)

rechronicle

  • Playmaker Newbie
  • *
  • Posts: 46
  • Medievaliant
    • View Profile
    • Indie RPG Creator
It's shaking indefinitely, how to smooth it up?
« on: June 02, 2019, 06: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!

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 988
    • View Profile
    • Fat Pug Studio
Re: It's shaking indefinitely, how to smooth it up?
« Reply #1 on: June 03, 2019, 01:28:43 AM »
Is he supposed to move smoothly from square to square or just change position?

rechronicle

  • Playmaker Newbie
  • *
  • Posts: 46
  • Medievaliant
    • View Profile
    • Indie RPG Creator
Re: It's shaking indefinitely, how to smooth it up?
« Reply #2 on: June 03, 2019, 05: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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4315
    • View Profile
    • jinxtergames
Re: It's shaking indefinitely, how to smooth it up?
« Reply #3 on: June 03, 2019, 08: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
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

rechronicle

  • Playmaker Newbie
  • *
  • Posts: 46
  • Medievaliant
    • View Profile
    • Indie RPG Creator
Re: It's shaking indefinitely, how to smooth it up?
« Reply #4 on: June 03, 2019, 11:01:53 PM »
@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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4315
    • View Profile
    • jinxtergames
Re: It's shaking indefinitely, how to smooth it up?
« Reply #5 on: June 04, 2019, 02:30:34 AM »
Hi.
Yes indeed.
There are also some other interpolate actions (color,vector2,vector3)

PlayMaker is also working on tween actions
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions