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 Sam_Pr · Oct 13, 2012 at 08:23 AM · throughpassfloor

How do I keep my camera from going through the floor?

Hello I'm trying to make a third person snowboarding game. The only problem is my camera goes through the ground on steep hills. If you have any idea on how to fix this I would appreciate it very much. thank you.

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 whydoidoit · Oct 13, 2012 at 08:24 AM 0
Share

In your camera in a fixed position or is it orbiting?

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Montraydavis · Oct 13, 2012 at 03:31 PM

Well, it seems like you're camera goes through floors only when big hills show up, so I am going to assume it's because you're camera is attached to the player ( or whatever you set it to ), and it's translating on the y axis (with the player).

Maybe try dis-attaching, and having the Camera follow* you only on the x-axis and z-axis . Of course this might limit your angling etc, but, you can tweak if around to fit your needs, or even add colliders to the hills that signal the camera to move up or down along the y axis.

Plenty of ways you can go about fixing that. Either of the two above will at least get you past your issue .

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 MarkFinn · Oct 13, 2012 at 02:19 PM

We had this problem in early versions of our first game. Sadly the whole game was dropped before hitting release, but we had two options for the solution.

First, dropping a cast to the terrain from the camera every 0.1 seconds and adapting from that. Second, adding a collider to the camera and making a flexible link between camera position (real) and camera position (ideal).

I prefer the first, as the second raises the possibility of the camera actually getting stuck in a rooftop somewhere, which would be embarrassing.

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 MrLolEthan · Oct 13, 2012 at 03:05 PM

You need to make sure you have a terrain collider on your terrain and a camera collider. Also if it still goes through the ground, then raise it over like 1 unity higher than the ground. If ANY part of the Camera is in the ground it will fall through.

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

13 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

Related Questions

Falling through the floor issue 11 Answers

I want to pass objects through each other AND detect the collision 1 Answer

Items falling through floor? 2 Answers

Raycast still passes through even with layers! 0 Answers

Allow Units with Colliders to Go Through Each Other 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