Jumping problems even is ISLAND example !!!

Hi guys, i used to use the 1st person controller prefab provided by unity3d per default, but the problem of this controller is:

When u keep jumping, u’ll actually able to go anywhere , even go throw huge montagne, and the reason is that the above collider is to big, so even if the controller hit an object almost vertical ( 160° ) the caracter keep jumping and going forwards …

Any solution ? thx …

–Eric

thx Eric, i used that script that u linked but still won’t work, i mean still the same problem,

may i didn’t explain it as it should,

to understand my problem, jst load the “ISLAND DEMO” example, and then jst Keep jumping, u’ll see that u can Climb where ever u want , even huge hills …

You either didn’t actually use it, or you didn’t read the instructions.

–Eric

Thanks dude, yes i really didn’t read carfully, now i got it …

( i changed “Run” to “Fire1” to test the project)

But since am a begginer in UNITY CODE, i’ll probably will have a mountain of threads …

Now the code is outputing me : " Input button “Run” is not setup. "

i got that “Run” isn’t stupi per default such as “Jump” and so on …

How to set it up ?!

Thanks !
regards&respect !!

You set up buttons in the Input Manager.

–Eric

hi again,

In ActionScript 2.0 or MaxScript , there’s a function called

Try( “Something” )Catch( “other thing”);

if Any error in “Something” will execute “other thing”

Does this function or similar to it exist in UNITY3D ?!

thanks.

try {
 var err;
 err = gameObject;
 err.ThisFunctionDoesntExist();
} catch ( e ) {
 Debug.Log( "Error: " + e.Message );
}

i tried that code, it says :

error CS0246: The type or namespace name `var’ could not be found. Are you missing a using directive or an assembly reference?

You put your own code inside the try/catch block. I was providing an example which works when in an actual .js function. :stuck_out_tongue:

Thanks Vicenti Anyway, but …

i tried ur example as u sent it, and i put mine as well :

try {
print (“ok”);
} catch ( ) {
print (“no”);
}
//----------------
even this prety simple example didn’t work :wink: