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 PulseLight · Aug 01, 2013 at 02:44 PM · androidbugghosting

Ghosting bug on my android device

When running the app in my unity it performs just fine, but after building the app, installing the .apk, and running it on my device I get a ghosting bug on my moving cubes.

In unity

alt text

on my device

alt text

This is my code, I have a cube spawner that makes instances which move from the center of the screen towards where the screen was touched:

Spawner.js

 var Cam : Camera;
 private var screenCenter = Vector2(Screen.width/2, Screen.height/2);
 private var pos : Vector3; 
 var Fireball : Transform;
 
 function Start () {
 
 }
 
 function Update () {
 
 
 if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) {
 pos = Input.GetTouch(0).position;
     var hit: RaycastHit;
     var ray : Ray = Cam.ScreenPointToRay (pos);
     
     
     if (Physics.Raycast(ray, hit)) {
                 if (hit.rigidbody != null){
                     if (hit.collider.gameObject.name == "Screen Plane") {
                         SpawnFireball (hit.point);
                     }
                 }
             }
     }
 }
 
 function OnGUI () {
 GUI.Label (Rect (pos.x-10, (Screen.height-pos.y)-10, 300, 20), "x="+pos.x+" y="+(Screen.height-pos.y));
 }
 
 function SpawnFireball (Lookatpoint: Vector3) {
 
 
                         var fireballInstance = Instantiate(Fireball, Vector3 (0, 0, 0), Quaternion.identity);
                           fireballInstance.transform.position = Vector3 (0, 0, 0);
                           fireballInstance.transform.LookAt(Lookatpoint);
 }

Fireball.js

 function Start () {
 Destroy (gameObject, 3);
 }
 
 function LateUpdate () {
 
 transform.Translate(Vector3.forward * Time.deltaTime * 5);
 }


unity.jpg (15.7 kB)
device.jpg (74.9 kB)
Comment
Add comment · Show 2
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 PAEvenson · Aug 01, 2013 at 04:32 PM 0
Share

What is the Clear Flags on your camera set to? I've seen that happen when you dont have one of your camera set to skybox or solid color... Hope this helps.

avatar image PulseLight · Aug 02, 2013 at 09:40 PM 0
Share

$$anonymous$$y initial setup was to clear flags on solid color and built using openGL 1.x. I've tried different combinations between the two and the only way that worked to get rid of the ghosting bug was to set clear flags to none and builoding it using openGL 2.x. I even tried adding a skybox and setting the flags on that but the result was the same.

Thanks for your answer, but I had hoped to resolve the issue and use the openGL 1.x to build the app in order to make it compatible with multiple devices.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by rupeshpamaihgari · Aug 01, 2013 at 08:07 PM

While building,go to player settings and change the graphics level to openGL 1.x instead of 2.x .

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

15 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

Related Questions

Problem with Sprites in Android. Maybe a bug? 0 Answers

Probuilder throws ArgumentNullException when Extruding ProBuilder object on Android 0 Answers

I'm getting an error when I try to build to Android 0 Answers

Android: Reloading scene causes graphics bug 1 Answer

scene buggy when built 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