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. XGBoost:在Python中使用XGBoost

    原文:http://blog.csdn.net/zc02051126/article/details/46771793 在Python中使用XGBoost 下面将介绍XGBoost的Python模块, ...

  2. IStat Menus 5.02 5.03 的注册码

    1574-5977-7956-8062-0000 6015-5448-3282-4975-0000 9665-5955-6856-2071-0000 2447-9517-7939-5221-0000

  3. 微信小程序app配置指南

    //app.json页面 { //页面注册,有几个页面都要在pages里面注册 "pages":[ "pages/index/index", "pag ...

  4. (剑指Offer)面试题1:赋值运算符函数

    题目: 如下为类型CMyString的声明,请为该类型添加赋值运算符函数. class CMyString{public:    CMyString(char* pData=NULL);    CMy ...

  5. 自己的一个js库

    https://github.com/sqqihao/nono_framework.git 持续更新,慢慢写着,这样才能成长

  6. Python网络爬虫 - 下载图片

    下载博客园的logo from urllib.request import urlretrieve from urllib.request import urlopen from bs4 import ...

  7. window中findstr命令的用法

    http://www.netingcn.com/window-findstr-command.html findstr是window系统自带的命令,用途是查找指定的一个或多个文件文件中包含(或通过参数 ...

  8. vb sendmessage 详解1

    SendMessage函数的常用消息及其应用(有点长,希望能对大家有所帮助)函数原型: Declare Function SendMessage Lib "user32" Alia ...

  9. js 数组循环删除元素或对象

    1.根据不同条件,删除数组中的元素或对象 for(var i=0,flag=true,len=attrList.length;i<len;flag ? i++ : i){ if(attrList ...

  10. Java 基础【11】.class getClass () forName() 详解

    类名.class是Class对象的句柄,每个被加载的类,在jvm中都会有一个Class对象与之相对应. 如果要创建新的对象,直接使用Class对象的局部class.forName就可以了,不需要用ne ...