Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
1
Question by nyarsulik · Sep 05, 2017 at 04:03 PM · physicsaddforcecamera followxboxvisual problems

Sphere Rigidbody visual oddities when moving at fast speeds & distances

When testing my Unity game on Xbox One I am getting a very large amount of visual "jitter" from the ball. This is a skeeball game where you control the movement of the ball. Essentially the core of the movement is similar to the Rollerball tutorials. On PC this works fine and there are no perceptible jitters. However, on Xbox, I am seeing this a lot more. The object is travelling large distances with the camera following smoothly behind. None of the other objects or scenery are affected, I actually think the camera itself is moving perfectly. But, the ball itself seems to glitch.

I double checked to make sure that controller input is checked in "Update", physics/addForce are adjusted in "Fixed Update" and the camera follow movement is adjusted in "LateUpdate".

The ball object has a sphere rigidbody and I am using AddForce to apply movement.

I'll try to see if I can capture some video of this happening, but since it mainly occurs on the Xbox that may be difficult. The best explanation I can give is that while flying through the air, the ball will hiccup and appear visually to jump slightly in any direction, but the physics and velocity don't change or anything, I think this really is just a visual issue. It doesn't happen as much for smaller movements, but the fast speed / long distance movements cause all sorts of trouble.

Thanks! Nick

Comment
Add comment · Show 7
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 nt314p · Sep 05, 2017 at 10:25 PM 0
Share

Could you post your code or a gif of the glitch happening?

avatar image nyarsulik · Sep 11, 2017 at 08:58 PM 0
Share

@n314p - Haven't figured out how to easily record from the Xbox One but have them available elsewhere, and the Windows 10 store doesn't display the game previews. If you have Xbox One, search for Extreme Skeeball in the Creators Collection group and check out any of the game captures on the Iceberg level. That is the level where it is most visible.

It's a big scene, and technically the ball is covering a pretty big distance while the camera is following it.

Otherwise, is there a way to access Xbox One game recordings outside of Xbox One? It seems strange that they don't show up in the store... I'll see if I can record my own game capture and upload it to OneDrive or something like that, I think I remember seeing that option somewhere...

If someone can help me figure it out, I'll send a free game code their way! :)

avatar image nyarsulik nyarsulik · Sep 11, 2017 at 11:10 PM 0
Share

Here is a screen recording from the Xbox. The visual glitch is pretty noticeable. YouTube Link

avatar image nyarsulik · Sep 13, 2017 at 03:51 AM 0
Share

Starting to think this is some weird update/fixedupdate/vsync issue... Here is some of my code from the skeeball object. I have tried the three vsync options, and I have tried to use fixedDeltaTime in the FixedUpdate function, but I still seem to have the same problem. Frame rate is generally between 150-200 when this happens.

 function Update()
 {
         moveHorizontal = Input.GetAxis("Horizontal");
         moveVertical = Input.GetAxis("Vertical");
         movement = new Vector3(moveHorizontal, 0.0, moveVertical);
 }


 //PHYSICS $$anonymous$$OVE$$anonymous$$ENT
     function FixedUpdate() 
     {
             if(playerInAir == false)
             {
                 GetComponent.<Rigidbody>().AddForce(movement * moveSpeed * Time.deltaTime);
                 my$$anonymous$$agnitude = GetComponent.<Rigidbody>().velocity.magnitude;
                 rollingSound.volume = .5 * my$$anonymous$$agnitude;
             }
             else if (playerInAir == true)
             {
                 GetComponent.<Rigidbody>().AddForce((movement * moveSpeed * Time.deltaTime) * moveSpeedInAir);
                 my$$anonymous$$agnitude = GetComponent.<Rigidbody>().velocity.magnitude;
                 rollingSound.volume = 0;
             }
                             
             my$$anonymous$$agnitude = GetComponent.<Rigidbody>().velocity.magnitude;
             velocityText.text = my$$anonymous$$agnitude.ToString("00");
             windSound.volume = .5 * my$$anonymous$$agnitude;
         
     }

I've got some other items in here to adjust a wind sound, but taking those out didn't seem to have any effect.

avatar image nt314p nyarsulik · Sep 13, 2017 at 09:52 PM 0
Share

How is the camera being moved?

avatar image nyarsulik nt314p · Sep 13, 2017 at 10:58 PM 0
Share

Just the standard smooth camera follow from Unity:

 using UnityEngine;
 using System.Collections;
 
 public class CameraFollow : $$anonymous$$onoBehaviour
 {
     public Transform target;            // The position that that camera will be following.
     public float smoothing = 4f;        // The speed with which the camera will be following.
 
     Vector3 offset;                     // The initial offset from the target.
 
     void Start()
     {
         // Calculate the initial offset.
         offset = transform.position - target.position;
     }
 
     void LateUpdate()
     {
         // Create a postion the camera is ai$$anonymous$$g for based on the offset from the target.
         Vector3 targetCamPos = target.position + offset;
 
         // Smoothly interpolate between the camera's current position and it's target position.
         transform.position = Vector3.Lerp(transform.position, targetCamPos, smoothing * Time.deltaTime);
     }
 }

This is pointing at the player transform.

I have gone back through and optimized a few things (I shouldn't have been calling GetComponent so many times, and I reduced some detail in things like the ocean water) and I think that has helped, but it still seems to be happening slightly on the PC. Like I mentioned earlier I am already getting O$$anonymous$$ framerates, so I don't think that is the issue. I'm building my changes for Xbox and will see if it got any better.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

159 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

Related Questions

AddForce in Coroutine 1 Answer

Addforce for 2d game is not doing anything. 0 Answers

RigidBody.AddForce() doesn't apply 2 Answers

Rigidbody AddForce() stops working after walking away for a while 0 Answers

Script makes plane point in general direction but doesn't point fully... read description please! 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