How to not make a child object affected by parent object's angular velocity?

Ok so iv’e got 2 objects, 1 is the Asteroid and other is a child glow following it, now the asteroid i have can rotate around via script, i’m trying to make the child glow not rotate with it, but just simply follow, i have tried adding the same rotator script that the parent asteroid has to the child glow and make it’s value 0 but it’s still rotating! , here’s a pic of what exactly i need:

and what i don’t want is if the parent asteroid rotates while going down, for the child to rotate like this with it:

i’ve also tried playing with the glow inspector setting but so far no luck

It sounds like you have the glow object actually set as a child of the asteroid in the scene hierarchy. Don’t do that. Make it an entirely separate object, with a script that makes it move to the appropriate position relative to the thing it’s following in LateUpdate.

Alternatively, I guess you could keep it a child of the asteroid, but then you’ll need a script that resets its global rotation every frame with something like

void LateUpdate() {
   transform.rotation = Quaternion.identity;
}

HTH,

  • Joe
2 Likes

to make a script that moves to positions relative to parent object seems way above my skill to make

i’ll try the other way, thanks

public Transform objectToFollow;
public Vector3 offset;

void Update () {
    transform.position = objectToFollow.position + offset;
}

oh wow, ok i will try… what value do i replace the offset with ?

Just assign it in the inspector via trial and error.

1 Like

@CyberInteractiveLLC

Watch this tutorial and everything will be clear.

2 Likes

damn bro that solved my problem too! tanks for that!