RANGER2009 发表于 2023-6-15 22:31:19

履带旋转方向问题

modb上下了个坦克,结果履带旋转方向是反的,看了下代码,貌似只能调轮子旋转方向,履带在哪里调么找到,请教下在哪调?

soldier 发表于 2023-7-14 17:55:35

本帖最后由 soldier 于 2023-7-14 18:01 编辑

您应该是改错代码了,修改了车轮转动代码。

以原版tnk_type98为例:
引导履带转动代码:
ObjectTemplate.activeSafe Spring CHtnk_type98B_Lwheel_05
ObjectTemplate.modifiedByUser "Administrator"
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.grip 128
ObjectTemplate.animatedUVTranslation 1
ObjectTemplate.animatedUVTranslationSpeed 0/0
ObjectTemplate.animatedUVTranslationMax 0/0.189(控制履带贴图转动方向,0/1 是上下,1/0 是左右)
ObjectTemplate.animatedUVTranslationSize 0/6.8 (控制履带贴图转动方向,0/1 是上下,1/0 是左右)
ObjectTemplate.animatedUVTranslationReverse 0(控制履带贴图转动的方向,0 是正转,1 是反转)
ObjectTemplate.animatedUVTranslationIndex 5
rem -------------------------------------
ObjectTemplate.addTemplate S_CHtnk_type98B_Lwheel_05_Rotation
ObjectTemplate.addTemplate web_tracked
ObjectTemplate.setPosition -0.18/0/0
rem -------------------------------------
ObjectTemplate.setStrength 0
ObjectTemplate.setDamping 0
ObjectTemplate.rotateUV 1

引导车轮转动代码,直观感受就是其引导代码比履带多好几行:
ObjectTemplate.activeSafe Spring CHtnk_type98B_Lwheel_04
ObjectTemplate.modifiedByUser "Administrator"
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.grip 128
ObjectTemplate.animatedUVTranslation 1
ObjectTemplate.animatedUVTranslationSpeed 0/0
ObjectTemplate.animatedUVTranslationMax 0.01/0 (控制车轮动画贴图周边面转动模式 1/0 是左右,0/1 是上下)
ObjectTemplate.animatedUVTranslationSize 16/0 (控制车轮动画贴图周边面转动模式 1/0 是左右,0/1 是上下)
ObjectTemplate.animatedUVTranslationReverse 0
ObjectTemplate.animatedUVTranslationIndex 2
ObjectTemplate.animatedUVRotation 1
ObjectTemplate.animatedUVRotationRadius 0.3 (车轮动画贴图转动直径)
ObjectTemplate.animatedUVRotationScale 0.5/1 (动画贴图模式 1/1 是正方形贴图,0.5/1 是长宽 1/2 贴图)
ObjectTemplate.animatedUVRotationIndex 1
ObjectTemplate.animatedUVRotationReverse 0 (车轮转动方向,0 是正转、1 是反转)
rem -------------------------------------
ObjectTemplate.addTemplate S_CHtnk_type98B_Lwheel_04_Rotation
ObjectTemplate.addTemplate web_tracked
ObjectTemplate.setPosition -0.18/0/0
rem -------------------------------------
ObjectTemplate.setStrength 0
ObjectTemplate.setDamping 0
ObjectTemplate.rotateUV 1

车轮和履带引导代码各有左、右一组。
页: [1]
查看完整版本: 履带旋转方向问题