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 /
This question was closed Jan 12, 2019 at 11:16 PM by AttilaZold for the following reason:

outdated

avatar image
0
Question by AttilaZold · May 04, 2013 at 01:14 PM · cameramouse look

My camera flickers and it's driving me crazy

I have a third person controller prefab with 1 camera. In the editor it works fine when tested, but in the built .exe it's like there are 2 cameras (one looking forward and one looking up 60 degrees). The screen flickers between these 2 views. And the mouse look doesn't work. What could be wrong here?

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 BobbleHead · May 04, 2013 at 02:49 PM 0
Share

Have you got any duplicate scripts? It's easy to duplicate/apply a script by accident.Add some Debug.Log to your scripts. See if you can track down any issues. Search in your Hierarchy with the exact script name to see.

Are you doing any weird rotation freezing? That can cause judders.

2 Replies

  • Sort: 
avatar image
1
Best Answer

Answer by defactonline · Sep 09, 2013 at 02:45 PM

I know it's a late answer, but i had the same problem and fixed by deleting a secondary mouse look script in the project. It was from another plugin. It works fine now.

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 AttilaZold · Sep 15, 2013 at 08:32 PM 0
Share

It's not late... Acutally I have only recently managed to find out it was about the $$anonymous$$OUSE LOO$$anonymous$$ SCRIPT. I had to delete it, and write a new one, following a tutorial video from YouTube. Now it works fine, but the up down directions are inversed. How could I fix that? What line in the script refers to that?

avatar image AttilaZold · Sep 15, 2013 at 08:38 PM 0
Share

var lookSensitivity : float = 5; @HideInInspector var yRotation : float; @HideInInspector var xRotation : float; @HideInInspector var currentYRotation : float; @HideInInspector var currentXRotation : float; @HideInInspector var yRotationV : float; @HideInInspector var xRotationV : float; var lookSmoothDamp : float = 0.1;

function Update () { yRotation += Input.GetAxis("$$anonymous$$ouse X") lookSensitivity; xRotation += Input.GetAxis("$$anonymous$$ouse Y") lookSensitivity;

 xRotation = $$anonymous$$athf.Clamp(xRotation, -90, 90);
 
 currentXRotation = $$anonymous$$athf.SmoothDamp(currentXRotation, xRotation, xRotationV, lookSmoothDamp);
 currentYRotation = $$anonymous$$athf.SmoothDamp(currentYRotation, yRotation, yRotationV, lookSmoothDamp);
 
 transform.rotation = Quaternion.Euler(currentXRotation, currentYRotation, 0);
avatar image AttilaZold · Sep 15, 2013 at 08:41 PM 0
Share

The UP DOWN directions are inverted. How do I change that in my script?

var lookSensitivity : float = 5; @HideInInspector var yRotation : float; @HideInInspector var xRotation : float; @HideInInspector var currentYRotation : float; @HideInInspector var currentXRotation : float; @HideInInspector var yRotationV : float; @HideInInspector var xRotationV : float; var lookSmoothDamp : float = 0.1;

function Update () { yRotation += Input.GetAxis("$$anonymous$$ouse X") lookSensitivity; xRotation += Input.GetAxis("$$anonymous$$ouse Y") lookSensitivity;

 xRotation = $$anonymous$$athf.Clamp(xRotation, -90, 90);
 
 currentXRotation = $$anonymous$$athf.SmoothDamp(currentXRotation, xRotation, xRotationV, lookSmoothDamp);
 currentYRotation = $$anonymous$$athf.SmoothDamp(currentYRotation, yRotation, yRotationV, lookSmoothDamp);
 
 transform.rotation = Quaternion.Euler(currentXRotation, currentYRotation, 0);
avatar image
0

Answer by AttilaZold · May 14, 2013 at 12:34 PM

I am certain that there are no duplicate scripts applied because I deleted the old and added a new FPS controller prefab from the unity standard assets. Could you please give me and example of a debug.log so I can add it to the mouse look and character motor scripts?

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

Follow this Question

Answers Answers and Comments

14 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

Related Questions

how to have 3rd person camera move like 1st person camera 0 Answers

Pause game camera movement s 1 Answer

Disabling Camera's "Mouse Look" while camera animation playing 0 Answers

How to make camera position relative to a specific target. 1 Answer

Controls Like the Mouse Look. Just without using Mouse 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