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
0
Question by CuddleMonster · Jul 21, 2013 at 03:16 PM · animationphysicscollidersclipping

Unity Animation Causes Clipping

I am working on a 3d platformer / puzzle game. This game will involve massive ammounts of moving platforms. Some of which have tunnels just imagine a floating cube with an entrance from the side. An issue I have come across is that when these cubes are moving they can cause clipping.

A specific example of this is when you are standing on the divider line between two tunnel sections, and one starts to move. I am using the unity animation system to move the objects. It would be convenient if I could still use that to move the level as it would save a lot of headaches. I am curious if there is any way I can move objects in a direction UNTILL they hit another collider. At which point they either stop or send a message.

any solutions would be great. Animate physics is on so it pushes the objects when it touches them, but it will push them through the walls of other things.

Comment
Add comment · Show 7
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 clunk47 · Jul 21, 2013 at 05:13 PM 1
Share

Have a look at the Script Reference for OnCollisionEnter, also look at OnTriggerEnter. If this doesn't help, there is an entire Platformer tutorial that involves what you are doing, provided by Unity themselves. HERE

avatar image CuddleMonster clunk47 · Jul 27, 2013 at 06:12 AM 0
Share

Irrelevant to question. I am asking about clipping and animation, not collision. A platformer tutorial such as lerpz does not even brush upon these topics.

avatar image clunk47 clunk47 · Jul 27, 2013 at 09:01 PM 0
Share

So I take it you have gone through this tutorial and know everything about it. Then why are you asking this question? I think you should look at all the information I have provided and test it out before you try to label my answer irrelevant.

" I am curious if there is any way I can move objects in a direction UNTILL they hit another collider"

COLLIDER

avatar image CuddleMonster clunk47 · Jul 28, 2013 at 02:20 AM 0
Share

The lerpz tutorial is irrelevant, yes. It does not cover clipping: which is my issue. OnCollisionEnter on the enviroment can work, though the way it would have to be implemented would make things complicated:

OnEnter: change VAR1 on player to += 1; On exit: Change VAR1 on player -= 1; Simple enough there... if the objects had a single collider for each moving piece. and could set the event to happen when VAR1 reaches 2. However That creates problems of its own: It would be touching two colliders while crossing seems.

To counter this it would require many many tags on the level and a small library of comparisons between tags to see when it should proc and when it should not.

I am asking if there is a way to stop animation(because I do want to use animation if possible) when a collider blocks the objects path, at that point it would call the message. If there is no builtin function in the animation system, then how would I go about doing this.. considering the problems I have listed (and that the player will ALWAYS be touching one or two of these moving objects)?

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

16 People are following this question.

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

Related Questions

How to animate collider along with object for 2D game? 1 Answer

Raycasting colliders moved by Mechanim animation? 0 Answers

Complex Animated mesh and Colliders 1 Answer

Physics colliders don't follow animation 0 Answers

Does unity take disabled colliders into account with the collider limit? 1 Answer


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