Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cocos creator 环境,微信开发者工具不支持MotionStreak轨迹 #641

Closed
changetheworldOuO opened this issue Oct 9, 2018 · 3 comments

Comments

@changetheworldOuO
Copy link

浏览器可以正常显示移动轨迹,开发者工具里却看不见,

// 给节点添加轨迹属性, 看环境是否满足创建 cc.MotionStreak
if(this.redPacketNum > 0) {
    this.trackIcon.setPosition(this.p1); // 定位到开始滑动的位置
    let motionStreak = this.trackIcon.addComponent(cc.MotionStreak);
    if(motionStreak) {
        this.motionStreakFlag = true;
        motionStreak.texture = this.trackTtextureURL; // 图片url
        motionStreak.fadeTime = 0.6;
        motionStreak.stroke = 20;
        motionStreak.color = new cc.color('#ffffff');
        motionStreak.parent = this.trackIcon;
        c.log('++++++ create MotionStreak success');
    else {
        this.motionStreakFlag = false;
        c.log('++++++ create MotionStreak fail');
    }
}

结果,浏览器环境输出 success, 开发者工具/小游戏 里输出 fail, 并且报

Error 3804, please go to https://github.com/cocos-creator/engine/blob/master/EngineErrorMap.md#3804 to see details.

@changetheworldOuO changetheworldOuO changed the title cocos creator 环境,开发者工具不支持MotionStreak轨迹 cocos creator 环境,微信开发者工具不支持MotionStreak轨迹 Oct 9, 2018
@changetheworldOuO
Copy link
Author

Cocos Creator v1.9.3, 微信开发者工具基础库 Wechat Lib:2.2.1

@jareguo
Copy link
Contributor

jareguo commented Oct 9, 2018

你需要在项目设置里勾选 MotionStreak

@jareguo jareguo closed this as completed Oct 9, 2018
@changetheworldOuO
Copy link
Author

你需要在项目设置里勾选 MotionStreak

非常感谢,问题已解决,之前使用 Graphics 模拟轨迹的方法可以取消了,很难真实模拟。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants