uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFlags)

{

if(_usingNormalizedPosition) {

CCASSERT(_parent, "setNormalizedPosition() doesn't work with orphan nodes");

if ((parentFlags & FLAGS_CONTENT_SIZE_DIRTY) || _normalizedPositionDirty) {

auto s = _parent->getContentSize();

_position.x = _normalizedPosition.x * s.width;

_position.y = _normalizedPosition.y * s.height;

_transformUpdated = _transformDirty = _inverseDirty = true;

_normalizedPositionDirty = false;

}

}

uint32_t flags = parentFlags;

flags |= (_transformUpdated ? FLAGS_TRANSFORM_DIRTY : 0);

flags |= (_contentSizeDirty ? FLAGS_CONTENT_SIZE_DIRTY : 0);

if(flags & FLAGS_DIRTY_MASK)

_modelViewTransform = this->transform(parentTransform);

_transformUpdated = false;

_contentSizeDirty = false;

return flags;

}

改成:

uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFlags)

{

if(_usingNormalizedPosition) {

CCASSERT(_parent, "setNormalizedPosition() doesn't work with orphan nodes");

if ((parentFlags & FLAGS_CONTENT_SIZE_DIRTY) || _normalizedPositionDirty) {

auto s = _parent->getContentSize();

_position.x = _normalizedPosition.x * s.width;

_position.y = _normalizedPosition.y * s.height;

_transformUpdated = _transformDirty = _inverseDirty = true;

_normalizedPositionDirty = false;

}

}

uint32_t flags = parentFlags;

flags |= (_transformUpdated ? FLAGS_TRANSFORM_DIRTY : 0);

flags |= (_contentSizeDirty ? FLAGS_CONTENT_SIZE_DIRTY : 0);

if(flags & FLAGS_DIRTY_MASK)

_modelViewTransform = this->transform(parentTransform);

if(isVisitableByVisitingCamera())//if the camera is not match this node, do not consume _transformUpdated.  [wantnon,  yuanotes]. see: https://github.com/cocos2d/cocos2d-x/issues/10063

{

_transformUpdated = false;

_contentSizeDirty = false;

}

return flags;

}

cocos2dx 3.3多相机下_transformUpdated bug的更多相关文章

  1. cocos2d-x CCEditBox 字符不能显示完全的bug

    cocos2d-x CCEditBox 字符不能显示完全的bug (cocos2dx版本 2.2.0)用CCEditBox制作帐号输入框,当输入的内容超过框的宽度时,框里面不会显示当前输入的字符,显示 ...

  2. alibaba druid 在springboot start autoconfig 下的bug

    alibaba druid 在springboot start autoconfig下的bug 标签(空格分隔):druid springboot start autoconfig 背景 发现.分析过 ...

  3. react native 0.56.0版本在windows下有bug不能正常运行

    react native的0.56.0版本在windows下有bug不能正常运行请init 0.55.4的版本 react-native init MyApp --version 0.55.4 注意v ...

  4. ie下的bug之button

    场景描述: 现在页面设计是都喜欢自定义按钮样式,某日接收到页面发现在ie下有bug,上代码: <div> <button><span><a href=&quo ...

  5. cocos2dx 3.17(Windows下) 接入skynet和sprotol

    大致流程一致,但是他的github上的版本,没有Windows的版本.打开他的win的工程会提示缺少一个模块. 本人环境 cocos2dx 3.17.1 当前最新 skynet-无视-当前最新 VS2 ...

  6. 阿里聚安全·安全周刊】一种秘密窃取数据的新型 Android 木马|iOS 11相机惊现BUG

    本周的七个关键词:  新型 Android 木马丨 TLS 1.3 丨  阿里安全图灵实验室 丨 漏洞感染 Linux 服务器 丨 CPU曝极危漏洞 丨   iOS 11相机BUG 丨R2D2技术 - ...

  7. cocos2dx+lua中cc.EventListenerMouse:create()的bug

    今天在调试项目的时候用到了鼠标事件的监听 在创建事件监听器的时候出了问题 cc.EventListenerMouse:create() 这句返回值为nil 原来这是cocos2dx引擎的一个bug,t ...

  8. Nginx 的 RTMP 模块的在线统计功能 stat 在 multi-worker 模式下存在 Bug

    < 让你的 Nginx 的 RTMP 直播具有统计某频道在线观看用户数量的功能>一文介绍了 Nginx 的在线统计模块.         我们的在线直播服务使用了 Nginx 的 Rtmp ...

  9. IE下的bug解决方案

    1.IE6下的双边距bug <!DOCTYPE html> <html lang="en"> <head> <meta charset=& ...

随机推荐

  1. Android 色彩设计理念

    色彩 色彩从当代建筑.路标.人行横道以及运动场馆中获取灵感.由此引发出大胆的颜色表达激活了色彩,与单调乏味的周边环境形成鲜明的对照. 强调大胆的阴影和高光.引出意想不到且充满活力的颜色. 色样 – 0 ...

  2. Jacoco覆盖率工具使用调研

    JaCoCo Java Code Coverage Library Jacoco是一个开源的覆盖率工具.Jacoco可以嵌入到Ant .Maven中,并提供了EclEmma Eclipse插件,也可以 ...

  3. 【React全家桶入门之十三】Redux中间件与异步action

    在上一篇中我们了解到,更新Redux中状态的流程是这种:action -> reducer -> new state. 文中也讲到.action是一个普通的javascript对象.red ...

  4. Java操作Excel文件以及在Android中的应用

    本文章由临江仙原创,转载请注明出处:http://blog.csdn.net/zhy_cheng/article/details/10286563 Excel作为一种有格式的文件,可以使用Java来对 ...

  5. nexus 批量导入本地库

    1.复制D:\maven\repository(本地仓库)到D:\sonatype-work\nexus\storage\central(nexus库路径) 2.Central --> upda ...

  6. NGINX原理 之 SLAB分配机制(转)

    1 引言 众所周知,操作系统使用伙伴系统管理内存,不仅会造成大量的内存碎片,同时处理效率也较低下.SLAB是一种内存管理机制,其拥有较高的处理效率,同时也有效的避免内存碎片的产生,其核心思想是预分配. ...

  7. TestNG方法測试及注意要点 代码及配置具体解释(解决testng方法不运行问题)

    教你解决为什么TestNG中方法加了@Test注解,也在配置文件里配置了,可是方法就是不运行! 在使用TestNG进行測试时,使用配置文件的方式更easy于维护.可是常常遇到明明方法写了也配置运行了, ...

  8. java 如何查看jdk版本&位数

      java 如何查看jdk版本&位数 CreateTime--2018年4月22日18:20:18 Author:Marydon 方式一:通过dos命令实现 win+R-->cmd-- ...

  9. AIX查看系统安装时间和运行时长

    $ lslpp -h bos.mp* --AIX系统的安装时间,可以通过bos.mp和bos.mp64文件集的安装时间得知 Fileset Level Action Status Date Time ...

  10. Oracle PUP(PRODUCT_USER_PROFILE)配置和使用

    近期在翻Oracle SQLPLUS官方文档,在讲SQLPLUS Security章节介绍了PUP这个机制.借此.我来使用下面: PUP(PRODUCT_USER_PROFILE)介绍   PRODU ...