- 好友
- 3
- 在线时间
- 1524 小时
- 最后登录
- 2022-10-8
贵族[MOD作者]
- UID
- 1177227
- 第纳尔
- 3483
- 精华
- 1
- 互助
- 7
- 荣誉
- 12
- 贡献
- 10
- 魅力
- 215
- 注册时间
- 2013-1-26
鲜花( 154) 鸡蛋( 1)
|
发表于 2019-1-1 00:01:13
来自手机
|
显示全部楼层
#算出骑兵相对你的横向速度↓ (agent_get_horse, ":enemies_horse", ":enemies"), (gt, ":enemies_horse", -1), (agent_get_speed, pos0, ":enemies"),#马速一般6-10,人一般0-4,输出时会乘以fixed_point_multiplier值再输出 (position_get_y,":speed_enemies",pos0), (store_sub, ":speed_1", ":speed_enemies", ":speed_y"), (position_transform_position_to_local, pos0, pos1, pos2), (position_get_rotation_around_z, ":angle_1", pos0), (convert_to_fixed_point, ":angle_1"), (store_cos, ":cos", ":angle_1"), (store_sin, ":sin", ":angle_1"), (position_get_x, ":x1", pos0), (position_get_y, ":y1", pos0), (position_normalize_origin, ":d1", pos0), (store_mul, ":k1", ":x1", ":cos"), (store_mul, ":k2", ":y1", ":sin"), (store_add, ":speed_relevant", ":k1", ":k2"), (val_mul, ":speed_relevant", ":speed_enemies",), (val_div, ":speed_relevant", ":d1"), (convert_from_fixed_point, ":speed_relevant"), (val_abs, ":speed_relevant"), 这一部分代码,没看懂。 请问相对的横向速度是指法线方向的分速度么? (position_get_rotation_around_z, ":angle_1", pos0), 根据相对位置向量得到的angle_1变量是,与z轴的夹脚吗,那不是90度吗? 后面通过正弦余弦的一系列操作得到了speed_relvant,他的作用是什么啊? |
|