简体   繁体   English

动画无法在游戏中正常运行,就像在场景视图中一样

[英]Animation not working in game as it is in the scene view

I'm trying to make an animation where the word contained in the middle of the screen has its letters that get highlighted one by one using an image overlay on which I increase the alpha from 0 to 0.5 over a short period. 我正在尝试制作一个动画,其中屏幕中间包含的单词的字母会使用图像叠加层逐个突出显示,在短时间内我将alpha值从0增加到0.5。

My problem is, even though the animation is fine in the scene view and when previewed, the overlay image seems to be duplicated out of nowhere and always in the same place. 我的问题是,即使动画在场景视图中很好,并且在预览时,覆盖图像似乎也无处不在并且总是在同一位置被复制。

Those duplicates do not appear in the scene view but they do appear in the game view and I can see no reason for them to show up. 这些重复项不会出现在场景视图中,但是会出现在游戏视图中,我看不出它们出现的原因。

Here are screenshots from the scene and game view : 这是场景和游戏视图的屏幕截图:

游戏视图中不需要的图像是两个大字母背景

没有出现的场景视图

EDIT : After more tests it is definitely an animation problem. 编辑:经过更多测试,这绝对是一个动画问题。 The animation runs as it should in the scene view but on some letters, in the game view, it is misplaced and scaled differently. 动画在场景视图中按原样运行,但在游戏视图中的某些字母上,放错位置和缩放比例不同。

Here are some more screenshots of what is going on : 以下是发生情况的更多屏幕截图:

Scene view 场景检视 场景检视 Game view 游戏画面 游戏画面

Ok so this was kind of silly mistake. 好的,这是一个愚蠢的错误。 It was caused by az value on my animated object set to -1595. 这是由我的动画对象上的z值设置为-1595引起的。 Setting it to 0 did the trick and the animation is now playing normally. 将其设置为0可以达到目的,动画现在可以正常播放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM