Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
CakeMonsTv

My player glitching on moving collider

Question

I ran into bug that i have no idea how to fix... The ship is moving up and down. My player is glitching through upper collider when it goes up as you see in this preview:

Please login or register to see this link.

 

These are two colliders on my ship model. The bottom one is for buoyancy and the upper one is for player to walk on the ship.

90a13dbf8e30b3d1fc299b87570f6f1e.png

 

Could someone please help me? Thanks!
Please login or register to see this link.

Share this post


Link to post
Share on other sites

17 answers to this question

Recommended Posts

  • 1

FixedUpdate for physics with a rigidbody - maybe ++

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Does your ship have rigidbody component? If yes try to switch Interpolate(at rigidbody component) from None to Extrapolate or Interpolate see what works for you best.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

It has rigid body but it didn't work.

Share this post


Link to post
Share on other sites
  • 0

Are you using character controller to move your character?

Share this post


Link to post
Share on other sites
  • 0

I think its bouncing because of slopes when your ship move try this:

 

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

I looked into this and turns out it's not a fix for my issue. My controller glitches into the collider when it goes up. I also tested if the controller bounces when i go down the hill like in the video and it doesn't.

Share this post


Link to post
Share on other sites
  • 0

The player has to be a child of the collider its standing on

Share this post


Link to post
Share on other sites
  • 0

Try it with unity standard fps controller as what happens then?

Share this post


Link to post
Share on other sites
  • 0

If none of the solutions above work, there is not much else to try. I have no problems in my project standing on rotating and moving platforms and all I'm doing is parenting the player so you must have some issue with the controller itself (as thenext stated) or you have interference between colliders and scripts or something.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

+1

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

What do you mean by this? - and ++?

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Sorry. I understand that these symbols could be a little bit incomprehensible for those who are not able to decypher my habits here :)

I would like just to say "maybe you should check if your code is inside a FixedUpdate section. This is necessary with a rigidbody".

... and always I close my sentences by ++

Share this post


Link to post
Share on other sites
  • 0

Try rigidbody controller (replace CC with capsule collider and add rigidbody competent).

Here will be basic controller script for test:

Please login or register to see this link.

or:

Please login or register to see this link.

 

With CC you must parent player under moving platform (like OcularCash recommended).

If it doesn't help, then maybe problem is in your controller script. Try this CC script:

Please login or register to see this link.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Thanks guys. I will try these options as soon as I have enough time and let you know if it works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×