- Home /
Objects not jumpable on
hello i would like to make some objects not jumpable on because if i jump on something it confuses my AI
What's the problem with the AI? It tilts when the character is at a higher position? If this is the problem, you should fix the AI code.
thats exactly what i did but still but thx aldonaletto
Answer by Kacer · Nov 21, 2011 at 09:44 AM
You can add a tag to the objects, lets say you make the tag "doNotJump", then in the character controller script you add a boolean which is set to false whenever you're colliding with a collider that has the tag "doNotJump".
Then you can solve this with a single if-sentence :P
you can access the character controller from another script if im not wrong, just access the variable that is named "isgrounded" and put it to false when you dont want him to jump.
or, you should be able to, or you could just make your own character controller.
well i still want to make him jump but not jump on the object
Answer by Dev Solo · Jun 25, 2012 at 09:54 PM
Or you could put a box collider over the object so there is an invisible wall that stops you from jumping on it?
Your answer
Follow this Question
Related Questions
Jumping increases movement speed 1 Answer
Jumping on top of an enemy problem 1 Answer
why Collider in tree Makes low fps 1 Answer
How to change the BoxCollider 2D Xoffset and Y offset by script ? 2 Answers
Scripting Help 1 Answer