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 /
avatar image
0
Question by eatsomechicken · May 28, 2018 at 10:38 PM · cameracollision

Why does the screen start spinning?

I made a game where you control a ball and try to collect all the things and get over obstacles. The obstacles are basically scaled cubes. The thing is that whenever the player touches the sides of the cubes, the whole screen starts spinning and the controls get messed up too. The screen only starts spinning when the player touches the side of a cube. When it is on the cube, it is perfectly fine. The screen doesn't spin when the player touches the bottom or the top. Can somebody tell me what is going on and how to fix it? Help greatly appreciated!

Comment
Add comment · Show 12
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 donutLaserDev · May 29, 2018 at 02:39 PM 0
Share

Probably an issue with how you parented the camera. But don't know for sure, need more information, pictures, video, anything that might help diagnose the problem.

avatar image eatsomechicken donutLaserDev · May 30, 2018 at 12:54 PM 0
Share

@donutLaserDev I had the player as the parent of the camera. I added a script to make the camera follow the camera. But note that the ball/player does not roll but only translates along the horizontal and vertical axis.

avatar image donutLaserDev eatsomechicken · May 30, 2018 at 01:02 PM 0
Share

Does the ball have a dynamic rigidbody attached to it?

Show more comments
avatar image spilat12 · May 30, 2018 at 01:24 PM 0
Share

Care to share your code?

avatar image eatsomechicken spilat12 · May 30, 2018 at 02:15 PM 0
Share

Which one? I have a script for the ball, the camera, and some obstacles.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by hawksandwichgames · May 30, 2018 at 02:24 PM

I'm about 100% sure it's because the ball is a parent of the camera. This becomes a problem when the ball itself rotates (probably initiated by hitting the side of an obstacle.) If the ball ever rotates and the camera is a child of that ball, the screen will go crazy. The way to test if this is the problem is by making sure the ball never rotates (do this by constraining rotation on the RigidBody of the ball and by making sure there's no code that causes it to rotate.)

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 eatsomechicken · May 30, 2018 at 02:33 PM 0
Share

Ok I’ll try it and see if it works

avatar image eatsomechicken · Jun 01, 2018 at 01:40 AM 0
Share

Yay it works i found the problem thank u a lot!

avatar image
0

Answer by anthot4 · May 29, 2018 at 02:48 PM

@eatsomechicken it is proberly a problem with how you have parented the camera.

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 eatsomechicken · May 30, 2018 at 12:48 PM 0
Share

I put the player as the parent of the camera. I added a script to make the camera follow the player.

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

177 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 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

Camera Collision Not Working 0 Answers

Camera collision 2 Answers

Camera bounce/collision 1 Answer

why camera does not recognize the collision? 1 Answer

move camera when it collides with a trigger 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