ricardojmendez / UnitySteer

Steering, obstacle avoidance and path following behaviors for the Unity Game Engine
https://numergent.com/tags/unitysteer/
Other
1.2k stars 275 forks source link

Follow/Align while Orbiting Another GameObject #55

Open TCMOREIRA opened 7 years ago

TCMOREIRA commented 7 years ago

Introduction: First of all: Thank you so much for UnitySteer! It is great!

I'm working on a 2D Physics-based game with zero gravity (in space); My game will use Steering Behaviours heavily!

Context: In my game you control Ships by touching on a Tablet; You touch and then the Ships follow your finger. I have such behaviour working just fine.

Issue: However, there's a Ship which Orbits around another GameObject with Input; I have the Orbiting behavior working just fine; However I only know how to make such behaviour by using key presses (To tell the Ship to go Clock-Wise or Counter-Clockwise);

The Player should be able to touch, and have the Ship Orbit around another GameObject trying to Steer to Follow and/or Allign with your Finger; Without breaking from her Orbit pattern;

image

image

image

The Ship will always try to Align as much as possible with your finger: image

Or Arrive at/Follow the Location of your finger: image

Can you Please Help Me? How one achieves such complicated steering behaviour using UnitySteer?!

Thank you so much for your time!