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

模拟器/原生端setPosition大坐标时, lerp 会卡顿 #18100

Open
zanqwq opened this issue Dec 30, 2024 · 2 comments
Open

模拟器/原生端setPosition大坐标时, lerp 会卡顿 #18100

zanqwq opened this issue Dec 30, 2024 · 2 comments
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@zanqwq
Copy link

zanqwq commented Dec 30, 2024

Cocos Creator version

3.8.4

System information

MacBookPro M1

Issue description

import { _decorator, Component, Node, v3, Vec3 } from 'cc';
const { ccclass, property } = _decorator;

const from = v3(-10);
const to = v3(-9, 0);

@ccclass('test')
export class test extends Component {
    start() {
        this.node.setPosition(from);
    }
    update(deltaTime) {
        this.node.setPosition(
            Vec3.lerp(v3(), this.node.position, to, deltaTime)
        );
    }
}

场景内添加一个 cube, 绑定上述脚本, 运行模拟器, lerp 平滑

但是 from 改成 v3(-10000), to 改成 v3(-9999) 后, lerp 出来很卡

Relevant error log output

No response

Steps to reproduce

场景内添加一个 cube, 绑定上述脚本, 运行模拟器, lerp 平滑

from 改成 v3(-10000), to 改成 v3(-9999) 后, 再次运行, cube 移动卡顿

Minimal reproduction project

No response

@zanqwq zanqwq added Bug Needs Triage Needs to be assigned by the team labels Dec 30, 2024
@minggo
Copy link
Contributor

minggo commented Jan 7, 2025

只在模拟器会出现吗?

@zanqwq
Copy link
Author

zanqwq commented Jan 10, 2025

android 也会

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

2 participants