playMaker

Author Topic: rigid body jittering when another Rigidbody is on it  (Read 1087 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
rigid body jittering when another Rigidbody is on it
« on: May 20, 2023, 05:43:24 PM »
Hello,

I have a rigid body 2d set to dynamic, collision detection continuous and interpolate set to interpolate. This is on a platform that moves downwards. Then I have the player standing on it. When the player is not standing on it it is fine, but if the player is on it, the platform will jitter. How do I get vertically moving platforms that have another rigid body on top of it to not jitter? Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: rigid body jittering when another Rigidbody is on it
« Reply #1 on: May 21, 2023, 05:55:39 PM »
Hi.
you need to parent player to moving platforms when they are on the platform

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #2 on: May 21, 2023, 08:34:41 PM »
I tried that. Didn't work. Any other ideas? Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: rigid body jittering when another Rigidbody is on it
« Reply #3 on: May 22, 2023, 06:50:14 AM »
Hi.
Maybe you need to set a physical material on it?

why do you need a rigidbody on the moving platforms?
How are you moving the platform

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #4 on: May 22, 2023, 01:43:22 PM »
On some platforms, it is just a rigid body moving it down on others I'm using tween position. I'm honestly not sure if I need the rigid body; I feel like I needed it for some reason, but I don't remember for sure. Physics material didn't seem to work. Any other ideas? Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: rigid body jittering when another Rigidbody is on it
« Reply #5 on: May 22, 2023, 05:22:32 PM »
Hi.
With Tween position, try changing the update type.
also try removing the rigidbody

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #6 on: May 22, 2023, 07:52:09 PM »
Tried that as well. No luck. I noticed that it only jitters when I'm on top of it. No other time. I tried it with both parenting, removing the rigid body, and changing the update type. Not sure if that helps...

Thanks!

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: rigid body jittering when another Rigidbody is on it
« Reply #7 on: May 22, 2023, 09:20:23 PM »

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #8 on: May 23, 2023, 12:29:07 PM »
I've watched that video in the past and am currently applying what it says to do in this game. Any other ideas? Thanks for trying though!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #9 on: May 23, 2023, 05:30:48 PM »
I also noticed when I set the platform's rigid body to 0, if I'm standing on it, it still falls (it stays still if I'm off of it). Not sure if this is a separate problem or related (and yes, freezing the platform is something you can do in the game). Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: rigid body jittering when another Rigidbody is on it
« Reply #10 on: May 24, 2023, 08:56:40 AM »
I think the main issues might be that it has a rigidbody and / or update type of the tweens.

can you show in a video what the jitter is

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #11 on: May 29, 2023, 09:30:29 PM »
Sorry, been busy with my real job. I will try to post it as soon as I get a free moment.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: rigid body jittering when another Rigidbody is on it
« Reply #12 on: May 30, 2023, 12:48:35 PM »
Hi.
Try setting interpolate to none on the player rigidbody while on the moving platform.

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #13 on: June 03, 2023, 02:42:06 PM »
Didn't work. I think (but don't know for sure) that it might have something to do with the camera being parented to the player. There are other situations where things appear jittery (example, rotating the camera 180 degrees). In this case the player is jittery when moving and jumping. Not sure if this is related, but thought I'd mention it. And sorry, no time to upload a video yet. Will try to do that soon. Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: rigid body jittering when another Rigidbody is on it
« Reply #14 on: June 06, 2023, 11:04:32 AM »
bump