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 /
  • Help Room /
avatar image
0
Question by MordazaH · Jun 06, 2017 at 02:28 PM · colliderwallclimb

Object moving fast keeps "climbing" walls

Hi all, I am still learning Unity and while trying to make something very simple, like a tank moves and there are some walls to avoid it going away, I happened to have this strange result when it hits wall and I keep pressing forward or if nothing is pressed and the speed remains for a while (but having an overal high speed), the tank sometimes collides well but sometimes it starts trying to climb the wall and in fact sometimes it manages that or get upside down etc My current tank is moved by calculating the new position and adding it to the transform position, has a box collider and a rigidbody with a trigger on the bottom to know if its hitting ground or on air (I plan to have ramps and bumps). So far I followed some project tutorials, like the first 5 or so including the Rolling ball, Space shooter, Tank among others projects but of course my idea is slightly different from the Tank project as I havent added constraints to any axys in movement or rotation, could you tell me what am I doing wrong here? thanks a lot beforehand and sorry if question is really silly.

Edit: I think I have somehow isolated the issue, if speed is high it happens always, is it normal?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by $$anonymous$$ · Jun 09, 2017 at 09:38 AM

@MordazaH Try setting collision detection to continuous dynamic on your Tank's rigidbody. This can help trigger the correct events on objects with a high velocity.

Comment
Add comment · Show 3 · 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 MordazaH · Jun 09, 2017 at 09:40 PM 0
Share

Thanks Digland2000 a lot, the fact is the problem seems less frequent with this setting but still happens, is there anything else you could advice?

avatar image $$anonymous$$ · Jun 09, 2017 at 10:14 PM 0
Share

@$$anonymous$$ordazaH I had a game object that would sometimes not trigger a collision with another collider because of its relative speed and size. It would go right through the object. Setting the collision detection to continuous fixed this for me. If your tank is affected by the wall and not going directly through it then the collision detection might be ok. When you calculate the new position for your tank could you project a raycast and see if you are about to collide with a wall? If yes, then you could change your velocity or put a constraint on the rotation. You could also use oncollisionenter to maybe break your wall apart and decrease the velocity of your tank.

avatar image MordazaH $$anonymous$$ · Jun 10, 2017 at 03:28 AM 0
Share

Thank you, as you said tank is affected by wall and not going through it, I think it could be due its size and the wall thickness as well as the ammount of units it moves per frame, and yes I see what you mean, that maybe if speed is high its maybe over for the colission system and I should slow down when the wall is detected with a raycast, I guess I should be casting like 4 rays or so to detect the inco$$anonymous$$g wall and slow down as you suggested, also breaking the wall sounds like a cool idea too. I will do as you suggested and hopefully it will work, thanks a lot =).

I dont think there is more to say on this subject however I will leave the question as unanswered just in case someone could suggest something else.

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

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

Related Questions

[CODING|2D] Walls that player is able to break through 1 Answer

How to make wall go up, when you collect cube? 0 Answers

Make the car stop by hitting the wall 1 Answer

raycast going through walls 0 Answers

Why are the 2D colliders not working? 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