public Projectile(Actor3D owner, Actor3D target, HierarchyObject3D missile) { Owner = owner; Position = owner.Position; Target = target; SetMissile(missile); }
public InterpolatingProjectile(Actor3D owner, Actor3D target, HierarchyObject3D missile) : base(owner.Position) { elapsedTime = 0; Owner = owner; Target = target; Position = Owner.Position; Orientation = Quaternion.CreateLookAt(Owner.Position, Target.Position, Vector3D.UnitZ); timeTillImpact = Owner.Position.DistanceSquared(Target.Position) / ProjectileSpeed; AddChild(missile); }