The direction of travel is not rotating with the projectile in the spinning GameObject.

I fire a projectile into a rotatable GameObject. The projectile is traveling from the top of the screen to the bottom of the screen. In looking down on it I spin the GameObject, lets say in a clockwise direction. The projectile’s position follows the spin of the GameObject. If I stop the GameObject at 180 degrees rotation the projectile continues to travel to the bottom of the screen where it should have had its position rotated and the force(?) too. The Force is always going in the direction of firing or the rebounding. It must get this from the GameObject. So do I need to continuously update some physics parameter to change the direction of force or travel of the projectile from some rotation parameter of the spinning GameObject?
Note: I do not use gravity.

var Opponentshoot = Instantiate(Opponentshoot,  GameObject.Find("SpawnPoint").transform.position, Quaternion.identity);
//var Opponentshoot = Instantiate(Opponentshoot,  GameObject.Find("SpawnPoint").transform.position,transform.rotation);
Opponentshoot.transform.parent = GameObject.Find("Phyzx").transform; //This causes curved trajectory!!!
Opponentshoot.rigidbody.AddRelativeForce(Vector3.forward * 50000);

It’s somewhat confusing, but I assume at first your projectile trajectory is being altered by the rotation of some object, and that you don’t want this. Am I right? If so, you must not make this object parent to the projectile, because any parent rotation will affect its children. If you need to child the projectile to something for any reason, create an empty object and child the projectile to it (and, of course, don’t move or rotate this object).

On the other hand, if you want the trajectory to be somewhat affected by rotation of other object, after the initial AddForce you can apply to the projectile at FixedUpdate a force based on some object’s vector - something like this:

function FixedUpdate(){
  Opponentshoot.rigidbody.AddForce(object.forward * 1000);
}

This is just pseudo-code, of course - Opponentshoot, for instance, is a local variable of your other function, and would not be known in FixedUpdate - but I suppose it can give you the basic idea.

EDITED: To make the projectile rotate with the parent object, you can’t use AddForce or set rigidbody.velocity - you must translate the projectile in its forward direction.

You will need two scripts: one similar to yours, but that just create the projectile, and the projectile script, which will move itself and check collisions. The shooting script is like yours:

var Opponentshoot: GameObject;

function Shoot(){
  var daddy = GameObject.Find("Phyzx").transform;
  var spawnPt = GameObject.Find("SpawnPoint").transform;
  var opponentshoot = Instantiate(Opponentshoot, spawnPt.position, daddy.rotation);
  opponentshoot.transform.parent = daddy; // the projectile is still childed to Phyzx
}

The projectile script must be added to the projectile prefab, and is very simple:

var speed: float = 50; // projectile speed

function Start(){  // projectile live 10s at most
    Destroy(gameObject, 10);
}

function Update(){ // move the projectile to local forward direction
    transform.Translate(Vector3.forward * speed * Time.deltaTime);
}

function OnCollisionEnter(col: Collision){
    Destroy(gameObject); // destroy the projectile if something hit
    // you can do other things here, like add points,
    // instantiate an explosion, or play a sound etc.
}

As the GameObject rotates the projectile also loops around because it is
Off center. But the projectile’s trajectory does not change with respectu
To its new position. The trajectory always maintains it initial direction.
I will try your fixedupdate() placement. So the trajectory needs to be dynamically
Updated as its parent changes?

Option 1.

If the projectile is on the left side and I fire it without the Parent
rotation the projectile will go to the right side. Simple.
If the parent is rotated the child projectile position rotates with the
parent. The projectile does not rotate on its own axis. It is in space
so it’s local rotation could be anything.
Back to referring to the projectile trajectory: If I rotate the parent
the projectile trajectory still goes from left to right even though the
world position of the projectile child moves.
If I fire the projectile child to a target in the parent GameObject the
projectile child should travel towards the target regardless of the
rotation of the Parent GameObject.

@overunity3d: well, that’s what i said. Rigidbodies are ALWAYS simulated in world-space even when they are childs of other objects. The documentation mentioned that, not very clearly but it is there: Rigidbody component.

In general you should avoid parenting a rigidbody to another moving / changing object. The position will be translated (so it will move along with the parent) but all physics properties (esp. velocity) will stay in world space.

The problem in the video is that a physics system tries to simulate the real world. Due to momentum an object will always try to keep moving at it’s current velocity and direction. In space you can orbit around large object because of gravity (not the simplified earth-gravity). If there’s no gravity between the orbitting object and the object in the center it can’t orbit, why should it?
(1 hour ago) Bunny83

How do we create things moving in a gameobject but spin that gameobject with the objects in that gameobjects moving correctly, like fire and forget? we fire a missile then turn away but the missile stays on track? As you can see in my video the objects just swish around instead of staying on track. But let me specify that the objects don’t have a target just a straight forward destination in the spinning game object.
(10 hours ago) overunity3d

Thanks guys. I realized I need to rotate the camera around a point and not spin the world. The Physx engine has inertia in it and I cannot alter or force the parameters that feed this process. My bonehead mistake. The player turns in space and yes the world does not revolve around the player. I finally see the error of my logic.