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. Global and Local Coordinate Systems

    ansys 中的坐标系 整体和局部坐标系(主要在建模中涉及) 整体坐标系是以你建模的整个建筑为一体,来确定坐标系的.比如你建一个矩形平面的建筑,整体坐标系一般默认水平方向为X轴,竖直方向为Y轴,以垂直 ...

  2. JS计算本周一和本周五的日期

    代码不长: var today=new Date();var weekday=today.getDay();    var monday=new Date(1000*60*60*24*(1-weekd ...

  3. 【C#】C#委托学习

    虽然做.NET这行也快2年了,但基础不太好啊,今天看了下委托方面的知识,记录下. 1.委托 总的来说,委托是一个类,它定义了方法的类型,使得可以将方法当作另一个方法的参数来进行传递,这种将方法动态地赋 ...

  4. C#.NET常见问题(FAQ)-如何批量增加或取消注释

    选中一批文本之后 批量增加注释:Ctrl+K Ctrl+C 批量取消注释:Ctrl+K Ctrl+U     更多教学视频和资料下载,欢迎关注以下信息: 我的优酷空间: http://i.youku. ...

  5. 该内存不能为written

    #include <stdio.h>int main(){ char *p = "abc"; printf("%s\n", p); *p = 'd' ...

  6. Flask 源代码阅读笔记

    我认为我已经养成了一个坏习惯.在使用一个框架过程中对它的内部原理非常感兴趣,有时候须要花不少精力才 明确,这也导致了学习的缓慢,但换来的是对框架的内部机理的熟悉,正如侯捷所说,源代码面前,了无秘密.这 ...

  7. Python 迭代dict的value

    迭代dict的value 1:values() 2:itervalues()  3:for key in Di:     print (Di[key]) 我们已经了解了dict对象本身就是可迭代对象, ...

  8. 关于zookeeper的自我解惑

    分布式服务框架 Zookeeper -- 管理分布式环境中的数据: http://www.ibm.com/developerworks/cn/opensource/os-cn-zookeeper/  ...

  9. 〖Linux〗OK6410a蜂鸣器的驱动程序编写全程实录

    最近在看一本书,受益匪浅,作者是李宁,下边是编写本次蜂鸣器的全程实录: 1. 了解开发板中的蜂鸣器 1) 查看蜂鸣器buzzer在底板中的管脚信息 2) 查看蜂鸣器在总线中的信息 3) 翻看S3C64 ...

  10. python之模块csv之 读取CSV文件(reader和DictReader2个方法)

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #读取CSV文件(reader和DictReader2个方法) import csv #csv文件,是一种常用 ...