Eragon 发表于 2017-8-23 10:11:16

        /**
       * Returns true if this actor has been rendered "recently", with a tolerance in seconds to define what "recent" means.
       * e.g.: If a tolerance of 0.1 is used, this function will return true only if the actor was rendered in the last 0.1 seconds of game time.
       *
       * @param ToleranceHow many seconds ago the actor last render time can be and still count as having been "recently" rendered.
       * @return Whether this actor was recently rendered.
       */
        UFUNCTION(Category="Rendering", BlueprintCallable, meta=(Keywords="scene visible"))
        bool WasRecentlyRendered(float Tolerance = 0.2) const;

lifei000 发表于 2017-8-23 12:53:56

厉害了楼主!

AirsoftGoGo 发表于 2017-8-23 14:30:35

Eragon 发表于 2017-8-23 10:11
/**
         * Returns true if this actor has been rendered "recently", with a tolerance in seconds to def ...
跟这个方法原理不同,虽然我也不知道WasRecentlyRendered这个值具体用来干嘛的,但这个值并不能用来判断空间位置关系,例如当你得到一个Actor是否被渲染的结果时,只知道在主摄像机下是否被渲染,如果是对另一个视角(如NPC)这个值就没有用处了。

dududu_2004 发表于 2017-8-23 18:26:45

这个思路有意思,学习了。

红泥同学 发表于 2017-8-23 20:16:21

感谢分享。学习了

59427046111 发表于 2017-8-24 09:20:19

AirsoftGoGo 发表于 2017-8-24 11:30:14

59427046111 发表于 2017-8-24 09:20
那这个东西,意义就不大了啊,本身不在视野中的物体,系统就不会渲染啊,这样是什么材质都无关的, ...

你没明白我写这篇文章的目的 我不是教怎么用材质

落叶随风 发表于 2017-8-24 13:13:05

有点看不懂,但是好像很厉害

AirsoftGoGo 发表于 2017-8-25 00:48:45

gambol 发表于 2017-8-23 09:49
这个有BUG哈,如果是正背对着目标的时候,有一段也是在-1~1这个范围的
你提的这个问题很好,不过也很好解决,已在原文补充

艾老表 发表于 2017-9-1 09:45:46

看看,先踩个点
页: 1 [2]
查看完整版本: 使用ue4材质检验一个世界坐标点是否在视野(视锥体)内