Skip to main content
Game Development

Return to Revisions

2 of 2
Add small example to contextualize
FSic
  • 188
  • 13

How to make a gameObject follow non trivial trajectories?

as the title of the question says, I was wondering if there is common method to make gameObjects e.g. enemies or bullets follow curvilinear trajectories before reaching their target. For instance, assuming to be talking about a top-down 2D game, there are multiple ways to make an gameobject, say an enemy follow a straight line like this to go hit the player:

enter image description here

But how to make it so that before reaching the player it would do something like this?

enter image description here

Does somebody have an idea?

I know that the question may sound not too specific, therefore for sake of argument, how could I make so that a bullet shot from an enemy follows an arch "à la Wanted" before hitting the player instead of just flying straight?

FSic
  • 188
  • 13
default

AltStyle によって変換されたページ (->オリジナル) /