space shooter on a planet surface...

Hi… I need help with a space shooter type of game. What I have right now is a ship that’s flying above a planet as if in orbit on it. You could fly around the surface of the planet.like an ant crawling on the outer surface of a orange. I have the camera following the ship as its flying around the planet. What I need is help with is the ship firing so that the bullets kind of follow the curve of the planet for a short distance. Also I need the enemies the bad guys to be on the surface of the planet as well, and have them chase after the player ship, when the player comes into range. I hope this made some sense. Any help would be great. Thank you

What type of gunfire do you need (laser line, projectile objects, particles…)? If you are using projectiles, are they rigidbody based or animated with the script?

Well i don’t know…what would be best for something like this? I think maybe particles for the space FX look… also it would be nice to have upgrades to the players ship. ex: from single shot to double shot to 3 way shot (that fans out from the ship) and so on.
also…I’m willing to pay for your time to help out. thanks

Here is a screen shot of what i have so far…

Regarding the above, you might try the Collaboration forum - I’m sure you’d get some takers.

Meanwhile though, if you just want to stick with the forums, maybe you can break the problem down and tell us what specific things you need help with (e.g. the visual effects, making objects follow the surface, implementing AI for the enemies, etc.). That’ll make it easier to offer specific, relevant advice.

what I’m looking for is to have the player shoot a projectile object and have that bullet follow the curve of the planet for a short distance (to the edge of the visible horizon) using the left mouse button.(rapid fire)

I can do all of the graphics myself…(what i have are just stand ins)

the large saucers don’t move but fire a slow guided missile at the player,if the player out runs the missile, the missile self destructs (the player can also shoot down the missile) also on later levels there will be smaller enemy fighters that follow the player around.

To make the player ship follow the planet surface I’m using a script that i got from this post:
http://forum.unity3d.com/viewtopic.php?t=36065&postdays=0&postorder=asc&highlight=orbitplanet&start=0
But what i would like is to have the ship follow a cross-hair courser (and hit the space bar for a speed boost)

using UnityEngine;
using System.Collections;

public class OrbitPlanet : MonoBehaviour {
   public float rotationSpeed = 120.0f;
   public float translationSpeed = 10.0f; 
   public float height = 2.0f;          //height from ground level
   private Transform centre;            //transform for planet
   private float radius;               //calculated radius from collider
   public SphereCollider planet;         //collider for planet

   void Start () {
      //consider scale applied to planet transform (assuming uniform, just pick one)
      radius = planet.radius * planet.transform.localScale.y;
      centre = planet.transform;
      //starting position at north pole
      transform.position = centre.position + new Vector3(0,radius+height,0);
   }
   
   void Update () {
      //translate based on input      
      float inputMag  = Input.GetAxis("Vertical")*translationSpeed*Time.deltaTime;
      transform.position += transform.forward * inputMag;
        //snap position to radius + height (could also use raycasts)
      Vector3 targetPosition = transform.position - centre.position;
      float ratio = (radius + height) / targetPosition.magnitude;
      targetPosition.Scale( new Vector3(ratio, ratio, ratio) );
      transform.position = targetPosition + centre.position;
      //calculate planet surface normal                      
      Vector3 surfaceNormal = transform.position - centre.position;
      surfaceNormal.Normalize();
      //GameObject's heading
      float headingDeltaAngle = Input.GetAxis("Horizontal") * Time.deltaTime * rotationSpeed;
      Quaternion headingDelta = Quaternion.AngleAxis(headingDeltaAngle, transform.up);
      //align with surface normal
      transform.rotation = Quaternion.FromToRotation( transform.up, surfaceNormal) * transform.rotation;
      //apply heading rotation
      transform.rotation = headingDelta * transform.rotation;
   }
}

A straightforward way to get the projectile to orbit the planet is to use transform.RotateAround. Start the object at the correct height above the planet’s surface (which will probably be the same position as the ship). Use the planet’s centre as the centre of rotation and the ship’s right vector as the axis of rotation. You will also need to define an angular speed (degrees per second):-

// On the projectile's script.
var rotSpeed: float;
var axis: Vector3;  // Set this to the ship's transform.right property.
var centre: Vector3;  // Set this to the planet's transform.position property.

function Update() {
  transform.RotateAround(centre, axis, rotSpeed * Time.deltaTime);
}