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

[可能是bug]往目标点走直线功能move_straight有移动惯性,导致目的地跟实际到达的点有偏差 #170

Open
1004452714 opened this issue Jul 24, 2024 · 4 comments
Assignees
Labels
bug 错误 Something isn't working

Comments

@1004452714
Copy link
Contributor

几个坐标点相近的时候感觉move_straight比move_along更方便(不用录路线,直接get_position())但实际用起来如视频演示一样,精准度比move_along要差一些。
视频地址(省流:22秒、44秒、1分9秒 有打印坐标对比)

另外关于走路套盾的功能,有两点小建议,一是希望可以加个开关,二是希望在开盾之前按一下s键(或者其他更好的方案),面向后方放盾,这样不挡路。
有一次在上坡的时候钟离放了个柱子,因为有坡度爬不上柱子,就一直原地顶着柱子原地踏步

附move_straigh的代码

from source.commission.commission import *
from source.interaction.interaction_core import itt
from source.map.map import genshin_map

Wyatt = Text(zh="怀尔德",en="Wyatt")

class LostKey_P1674N4817(Commission):
    def __init__(self):
        super().__init__("ThingAFatherCanDo", [1674, -4817], is_CFCF=True, is_TMCF=True)
        a1=[1776.3479,-4685.9582]
        a2=[1725.4636,-4639.1651]
        a2turn=[1700.1493,-4649.6488]
        a3=[1699.8936,-4628.17]
        b1=[1561.0485,-4904.326]
        b2=[1513.4883,-4811.7626]
        b3=[1505.0502,-4749.1161]
        self.path_a=[a1,a2,a2turn,a3]
        self.path_b=[b1,b2,b3]
    def exec_mission(self):
        self.move_along(path_to_Wyatt,is_precise_arrival=True)
        self.talk_with_npc(Wyatt)
        self.talk_skip()
        
    def test(self):
        for path in self.path_a:
            self.move_straight(path,is_precise_arrival=True)
            print('目的地:',path)
            print('当前所在地:',genshin_map.get_position())
        itt.delay(5)
        for path in self.path_b:
            self.move_straight(path,is_precise_arrival=True)
            print('目的地:',path)
            print('当前所在地:',genshin_map.get_position())

        self.commission_succ()
        
if __name__ == '__main__':
    execc = LostKey_P1674N4817()
    # execc.start()
    execc.test()
@infstellar
Copy link
Owner

套盾会优化,之后没有怪就不会套盾

@infstellar
Copy link
Owner

意思是move_straight会走过头是吗

@1004452714
Copy link
Contributor Author

意思是move_straight会走过头是吗

是的

@infstellar infstellar self-assigned this Jul 29, 2024
@infstellar infstellar added the bug 错误 Something isn't working label Jul 29, 2024
@infstellar
Copy link
Owner

正在重构移动模块(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 错误 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants