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 PiffPaff · Jun 06, 2012 at 05:35 PM · animationcameramodelvisibilityvisible

Problems with the visibility of an animated object

Hello,

I'm having problems with the visibility of an object that pursues the player from behind. The object is a bone based model that was animated along a path in 3Ds and uses a sphere collider in Unity.

The game makes use of Unity's 3rd person character controller and, thus, takes place in a 3D environment where we follow the player character. As the character, we trigger the instantiation of the aforementioned object via a collider trigger on the ground. We then have to constantly run away from the object. It follows us and kills the player when it catches him.

As can be seen in the hierarchy, the object is always instantiated correctly. However, the problem is that the object does not always become visible in Game View while chasing us and often pops up out of nothing in seemingly random spots.

Sometimes, it never shows up after being instantiated. Sometimes, it pops up in the wrong place, with the character already being INSIDE the object, without ever having seen it approaching from behind. Sometimes, it will actually pop up in front of the player after a while, having overtaken him without any sort of notice or consequence.

When passing the trigger slowly and walking away slowly, the object is more likely to show up correctly than it is when running away from the trigger at full speed and waiting for the object afterwards.

The behaviour seems to be largely random. One thing to note is that the object does NOT kill the player when invisibly passing him.

What's weird is that all of this only happens in Game View. When watching the object's behaviour in Scene View, the animation plays out flawlessly and the object follows its destinated path perfectly and is visible at all times and without any interruptions.

Furthermore, when using a split window design in Unity and having both the Scene View and Game View visible simultaneously, the objects behaves perfectly in Game View.

I've figured that the cameras I use might play a role in causing this issue. When running away from the object, it never becomes visible when approaching/passing us. When turning around and facing it, it usually becomes visible. When switching to another camera that makes the character turn his head to look behind him, the object usually becomes visible right away.

This leads me to believe that this is likely a visual problem. I'm not exactly positive on that though, as I don't know how this would explain the object's collider being defunct. If it was exclusively a visual problem, wouldn't the player still be killed by the invisible object?

Anyway, could the camera somehow not render or clip the object if the root of the mesh is not ahead of the camera? Settings for ALL cameras are: near clipping plane = 0.3, far = 10000.

Or could this be something else? I'll post any required code when necessary/requested.

Any advice is welcome.

Thanks in advance for any help, PiffPaff

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by PiffPaff · Jun 07, 2012 at 01:18 AM

OK, looks like this issue is fixed.

I created yet another camera and placed it way above the level, looking down at the level (in a similar position to what I used in the Scene View to be able to see the entire level). I set the depth of that dummy camera to -10.

The object acts correctly now. Seems like the object didn't animate correctly (or animate at all) when it was off screen. Choosing "always animate" didn't help and neither did "updateWhenOffscreen". But the dummy camera that 'indirectly' watches the object at all times solved this problem.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to know when a object is in the viewport? 1 Answer

Walk/run animation moves main camera up and down (first person) 1 Answer

Problem is "renderer.isVisible" 3 Answers

Can I make the camera see only a part of an object? 1 Answer

Problem with camera and animations in making a Unity FPS 2 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