Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by nabarun1011 · Mar 22, 2017 at 07:28 AM · unity 53dcollidersplayer movementplatform

Player falling through the floor on running?

Hello everyone. Have anyone experienced a bug of player falling or sinking through the platform like in the video? I have added a plane with box collider. And box colliders on players feet. So, how to solve this bug?

alt text

Colliders are: alt text

Protoype video:Video Url

Moreover sometimes the player falls down completely through the ground :/ .

Code to move player:

 private void FixedUpdate()
     {
         float sideMotion = Input.GetAxisRaw("Horizontal");
         float straightMotion = Input.GetAxisRaw("Vertical") ;
 transform.Translate(Vector3.right * sideMotion * strafespeed * Time.deltaTime);
         
 
         transform.Translate(Vector3.forward * straightMotion * movementSpeed * Time.deltaTime);
 }
 


  


  


bandicam-187.jpg (83.3 kB)
bandicam-185.jpg (83.0 kB)
Comment
Add comment · Show 9
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sirjoan620 · Mar 22, 2017 at 09:00 AM 0
Share

Your video is not public.

avatar image nabarun1011 sirjoan620 · Mar 22, 2017 at 10:50 AM 0
Share

wait I am uploading in youtube then.

avatar image nabarun1011 sirjoan620 · Mar 22, 2017 at 10:54 AM 0
Share

link updated

avatar image hexagonius · Mar 22, 2017 at 09:46 AM 0
Share

how are you moving him?

avatar image nabarun1011 hexagonius · Mar 22, 2017 at 10:58 AM 0
Share

the script is also placed in the question

avatar image sirjoan620 · Mar 22, 2017 at 11:36 AM 0
Share

I think when you animate characters foots, your box colliders move up. So, you should create a different gameobject that independent of foots and includes box colliders.

avatar image nabarun1011 sirjoan620 · Mar 22, 2017 at 11:49 AM 0
Share

that is an independent collider gameobject. Just parented to foot :/

avatar image Mughees_Mehdi · Mar 22, 2017 at 12:37 PM 0
Share

I think issue is with animation, Does issue occurs without animation playing ?

avatar image nabarun1011 Mughees_Mehdi · Mar 22, 2017 at 01:09 PM 0
Share

I somewhat fixed the issue. On running, but now I everytime jump, my player sinks on ground. And I have not done any jump animation though.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by hexagonius · Mar 22, 2017 at 07:38 PM

your animator needs to be configured to animate physics. other than that, do not translate the guy. either use AddForce, set velocity, or mark the rigidbody kinematic and use MovePosition.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Player movement on tilting platform 0 Answers

Removing instantiated objects?? 1 Answer

What is the best way nowadays to record a film/movie(mp4) with Unity? 1 Answer

My 3D collider is not detecting colissions. 1 Answer

Why am I only allowed to trigger my dash script once? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges