我试图让一个圆柱体正确飞行(想象一支带尾翼的箭/导弹)。
我们知道我们的旅行方向和速度作为一个vector3。我们知道汽缸的旋转(四元数)。
我们有一个校正因子,我们可以施加一个力,在尾部旋转圆柱体,以对齐方向的旅行。
我们应该如何计算这个力的vector3 (力和方向)在尾部应用?
到目前为止,我的伪代码/评论:
/* First find out the relative wind vector (inverse of our direction of travel) overal aangle of attackl (aoa) */
Vector3 RelativeWind = rb.velocity * -1;
/* Next work out current alighment of the body */
Quaternion myAlignment = rb.transform.rotation.
/* Now return a vector of the direction we need to rotate in to align with relative wind */
/* and how large this quat is (ie how far out of line we are in the 3 axis */
/* Because missile is unified cylinder, we can lookup for all axis from same curve */
/* Now compute the force applied from the lookup curve */
/* Finally multpley by the "effective Fin Force" and output as force at the centre of Lift of the
* fin Rig - this wil then rotate the entire missile system accordingly */发布于 2021-09-02 15:27:01
与其用文字描述力传播到圆柱质心的方式,不如用接头把尾巴连接到圆柱上,只写尾巴与风的相互作用的逻辑。
https://stackoverflow.com/questions/69027713
复制相似问题