Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
2
Question by logging_out · Mar 05, 2011 at 08:46 PM · falling-through-floorfalling-off-moving-thing

Player Falling Through Elevator

In my scene I have an elevator where the player can walk on and it will move up. I created an animation for it and used this script to activate it.

function OnTriggerEnter (other : Collider) {
animation.Play(); 
}

The problem is whenever the player walks on the elevator and it starts moving the player falls right through the floor. I think it might be something to do with the player. Thanks for any help.

Comment
Add comment · Show 1
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 meat5000 ♦ · Nov 21, 2013 at 01:53 PM 0
Share

'Animate Physics'

6 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by RampantStudios · Mar 06, 2011 at 12:12 PM

You will want to put a game object just under the elevator floor with a box collider, make sure that box collider is set to NOT be a Trigger.

The problem your having is that you've set the elevator to be a trigger but as a trigger doesnt actively collide with other objects (It just sends events when things go through it) your character is falling through it.

Give me a shout if that works, if not drop me a message here.

Comment
Add comment · Show 2 · 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
avatar image logging_out · Mar 07, 2011 at 09:58 PM 0
Share

I do have a box collider on my elevator. I used an empty Game Object to use it. When I walk on the elevator my character stays on it, but only when it starts moving does it fall through.

avatar image RampantStudios · Mar 08, 2011 at 04:05 AM 0
Share

Oh in that case, make sure you move the character thats standing on it up before you move the elevator up (Otherwise the character will clip through the collision mesh and fall through).

avatar image
0

Answer by Myth · Mar 05, 2011 at 10:14 PM

Have you got the charactermotor or other such script attached to the player object?

(not sure on wiether this will work with animation but does work with scripted movements.)

Comment
Add comment · Show 1 · 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
avatar image logging_out · Mar 07, 2011 at 10:05 PM 0
Share

Okay, so I found the script, but when I tried to add it Unity said the script class couldn't be abstract. I'm using the First Person Controller standard asset if that helps.

avatar image
0

Answer by Velketor · Mar 16, 2011 at 03:02 PM

just duplicate your elevator and turn off the mesh renderer. it will provide 2 checks for the mesh collision instead of just 1. this has fixed problems for me in the past with animations and falling through during movement.

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
avatar image
0

Answer by Ricky Stefani · Mar 18, 2011 at 06:02 PM

Do you know OnTriggerEnter need the is Trigger(True) right?

Comment
Add comment · Show 1 · 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
avatar image logging_out · Mar 18, 2011 at 08:39 PM 0
Share

I don't think you're referring to my problem. The animation plays just fine, it's just my character falls through the floor when the elevator moves up.

avatar image
0

Answer by bwiegele · May 20, 2011 at 01:19 AM

logging_out, did you get a solution to this as I'm having the same problem. I'm using a 3rd person controller and I do have the Normal Character Motor script on him as well.

But each time I step on the platform it raises but only takes my character about half way up before he just falls through it.

I've tried doubling the mesh as well. Nothing.

Comment
Add comment · Show 1 · 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
avatar image logging_out · May 22, 2011 at 11:25 PM 0
Share

No I still haven't figured it out, I even tried changing the script to work differently. I'll post an answer though if I do find out.

  • 1
  • 2
  • ›

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

problem with character 1 Answer

Character falling through terrain 1 Answer

Why is my player falling through the terrain? 1 Answer

Making items solid? 3 Answers

Platform Effector 2D with rigidbody2D 0 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