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. C++变量未进行初始化时的默认值

      对于built-in类型,未初始化的变量的值是undefined value. 对于自定义类型,未初始化变量的值是类型默认构造函数指定的值.  

  2. 免费的Bootstrap等待页面的应用模板

    在线演示 本地下载 这是一款适合移动设备的网页模板,它页面干净小巧.有很多新元素在其中,可以自定义动画和特效.非常酷!

  3. 自定义Lisp透明命令

    我们知道在CAD中,如果我们在命令前面加一个单引号,则为透明命令.透明命令就是一个命令还没结束,中间插入另一个命令,然后继续完成前一个命令.插入的命令即透明命令,插入透明命令是为了更方便的完成第一个命 ...

  4. 配置Tomcat和JDK

    第一步:下载jdk和tomcat 第二步:安装和配置你的j2sdk和tomcat:执行j2sdk和tomcat的安装程序,然后按默认设置进行安装即可. 1.安装j2sdk以后,需要配置一下环境变量,在 ...

  5. WPF 同一个程序 只允许 同时运行一个

            方法2  当程序已经运行了 再运行这个程序时,则显示当前这个窗体  http://code.3rbang.com/cshape-run-one/ VS2013附件:http://fil ...

  6. java实现内部排序算法

    冒泡排序 public class BubbleSort{ public static int[] asc(int[] a){ int item; for (int i = 0; i < a.l ...

  7. Windows平台Hadoop编译、安装、配置与运行(转)

    http://www.srccodes.com/p/article/38/build-install-configure-run-apache-hadoop-2.2.0-microsoft-windo ...

  8. android 使用AsyncHttpClient框架上传文件以及使用HttpURLConnection下载文件

    AsyncHttpClient开源框架android-async-http还是非常方便的. AsyncHttpClient该类通经常使用在android应用程序中创建异步GET, POST, PUT和 ...

  9. ConcurrentHashMap并不是绝对线程安全的

    import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; publi ...

  10. Web服务器(容器)请求常见的错误及其解决方法

    首先我们来看看容器如何找到service()方法?(1)当在浏览器中输入 http://localhost:8080/firstweb/sayHi 这个地址后,容器是如何找到 HelloServlet ...