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 Facundo · Apr 26, 2010 at 09:12 PM · animationoffscreen

How to animate an object outside of camera field of view?

I have an animated model which is initially outside the camera field of view (i.e. not visible). When the level starts the animation is supposed to bring the object into the field of view. But, alas, the animation does not seem to play if the object is not visible.

So, is there an intended way to cope with this?

I unchecked the "Animate Only if Visible" property of the animation without obtaining any difference in behavior.

There seems to be a post in the forums which mentions the issue: http://forum.unity3d.com/viewtopic.php?t=30401&start=0&postdays=0&postorder=asc&highlight=animate+visible

Someone explains a workaround that involves adding a camera, which does not work for me. Another workaround is to set a property "Update When Offscreen" of skinned mesh renderers, which is rather inconvenient when the object has a lot of skinned mesh renderers, and does not say what to do in the case of having a non-skinned mesh renderer.

Update: I'm currently using the following script attached to the model in order to avoid setting by hand the property "Update When Offscreen" in the many nodes that need it.

import UnityEngine

class UpdateWhenOffscreen (MonoBehaviour):

 def Start ():
     for mr as SkinnedMeshRenderer in GetComponentsInChildren(SkinnedMeshRenderer):
         mr.updateWhenOffscreen = true

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
2
Best Answer

Answer by Eric5h5 · Apr 26, 2010 at 11:12 PM

"Update when offscreen" isn't a work-around, it's the correct thing to do. Typically an animated object will have a single skinned mesh renderer, so most of the time it's just a matter of checking one box. The case of having a non-skinned mesh renderer is a non-issue, because that can't have any mesh animation anyway so you don't have to worry about it.

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 Facundo · Apr 26, 2010 at 11:59 PM 0
Share

Thanks for the explanation. It looks like I'm not on the typical case :). The documentation for "Update When Offscreen" seems to complement a bit the subject: http://unity3d.com/support/documentation/Components/class-Skinned$$anonymous$$eshRenderer.html

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

No one has followed this question yet.

Related Questions

Can the animation editor create local rotational data? 3 Answers

Adding animation clips via script 2 Answers

Can I make animations snap to a frame? 1 Answer

How to select an animation clip by index number? 7 Answers

Play Animation A after Animation B ends 3 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