项目需求
在项目中要实现导弹的发射轨迹,一种是抛物线,另一种是折线。网上大多数实现都有一定的缺陷,炮弹飞行过程中需要一直瞄着目标位置,抛物线的轨迹要由高度控制。
实现
最后实现了:


参考文章
Unity C# Calculates Missile Parabolic Trajectory and Steering
Projectile Motion Tutorial for Arrows and Missiles in Unity3D
Arcing Projectiles in Unity
TrajectoryTutorial v2.0