hello, i’m working to create a jetpack system, but i have a little problem attaching the jetpack to the player.
always that i attach the jetpack to the player it got some weird rotation from the current player rotation and the jetpack never got with the right rotation.
i’m using this code to attach the jetpack to the player
void GiveJetPack(){
GameObject parentOb = JetPackAttachLoc.transform.gameObject;
ActiveJetPack = (GameObject)Instantiate (JetPackPr, parentOb.transform.position, Quaternion.Euler (0, 0, 0));
ActiveJetPack.transform.parent = parentOb.transform;
bHasJetPack = true;
}
there is someway to attach the object to the player without getting the player rotation to avoid weird rotation for the jetpack ?
thanks in advance for all your help.