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 Catlard · Oct 12, 2011 at 01:00 PM · colliderignorecollisioncontact.point

Pseudocode for jumping through the bottoms of platforms.

So, I'm creating a sidescroller, and I'm having trouble achieving a certain gameplay effect. Basically, I'd like for my character, with a rigidbody collider, to be able to jump to platforms by jumping up through the bottom of them -- a la Sonic the Hedgehog. In the script I'm using that detects collisions between the player and the platforms, I'm using Physics.IgnoreCollision to achieve this effect. The second time the player hits a platform he's allowed to pass through it. But the first time my player character collides with a platform, he's knocked back, and then he falls back through it. Is there a simple way of remedying this situation? I can see two potential solutions. Which one do you think is the winner?

1) I use colliders the same size as the platforms BELOW and ABOVE those platforms to turn physics.IgnoreCollision on and off when my player character hits them.

2) I turn Physics. IgnoreCollision off for all platforms until I am above them--then checking constantly to see which platforms are below me, and making sure those are on.

What do you think?

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 Kacer · Oct 12, 2011 at 01:19 PM 0
Share

if you've got a true sidescroller, with no 3D effect at all, why not move the platform back a bit?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by wccrawford · Oct 12, 2011 at 01:50 PM

I would try having a trigger below the platform that turns off the platform's collision, and then when the player leaves the tigger area, turn the collision back on. The trigger should mostly cover the platform, with the exception of the very top.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Missile colliding with Character Controller 3 Answers

Physics.IgnoreCollision not working 0 Answers

How do I find the point of contact on a box collider? 1 Answer

Ignore Collision Between Model and Player 2 Answers

Problems With IgnoreCollision 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