How can I make my character jump higher when they are in a certain “Zone” or coords. of the map? Preferably zone. I am using the CharacterMotor.js in the Character Controller, that comes with unity.
Thanks, MrReborn121
How can I make my character jump higher when they are in a certain “Zone” or coords. of the map? Preferably zone. I am using the CharacterMotor.js in the Character Controller, that comes with unity.
Thanks, MrReborn121
Create a cube that contains the Zone. Turn off the renderer. Select trigger in the cube collider. On a script create a class
void OnTriggerEnter(Collider c)
{
c.gameObject.getComponent<jumpScript>().jumpAmount = newAmount;
}
void OnTriggerExit (Collider c)
{
c.gameObject.getComponent<jumpScript>().jumpAmount = oldAmount;
}
Add this script to the cube that contains the zone.