whenever i jump on a moving platform my ball shape gets changed and it speed slow downl

player = ball
moving platform include a script “hold character”
which is given here
""using UnityEngine;
using System.Collections;
public class HoldCharacter : MonoBehaviour {

void OnTriggerEnter(Collider col){
	col.transform.parent=gameObject.transform;

}

void OnTriggerExit(Collider col){
	col.transform.parent=null;
}

}
""and it speed also slow down on restart chekpoint
i tried as much as possible but i cant find a solution yet
please help

1 Answer

1

Hi. maybe your player or the platform is not using the same scale…
Try this…

onTriggerenter .

  1. Save the current Local Scale of the player to a temp variable.
  2. try setting the localScale of the player to 1.
  3. set the parent.

OnTriggerExit.

  1. unparent
  2. restore localscale with the values of temp variable