- Home /
Wall jump need help!!!!!
Hi all i am trying to make a wall jump like in Mario Galaxy 2 :
http://www.youtube.com/watch?v=Q4Mhbhn6t7I
take a look at the link and you will see what i am talking about. Now what i am thinking is to have a trigger on each wall and when the player collides with the walls i will make him play the stick to the wall animation and then parent his position for 2 secs after that i will start playing the sliding animation which will make the player start sliding down and then when he touches the ground its back to the idle animation. But if the player is collided with the wall i want him to be able to jump of the wall as well like shown in mario :)
by the way the player is not using a character controller it is using a rigidbody. please i will be really really happy if someone could help me :)
by the way i was thinking the events should happen is OnTriggerEnter and OnTriggerExit
thanks in advance.
sorry if i dont have any script i was just thinking of the idea and how to come about it.
could you possibly code it so that when your character controller is on a platform exceeding his slope limit that you change your regular jump feature to that of a wall jump? Just a suggestion don't have time to try it out myself but hope it's of some help :)
Answer by Jason B · Mar 30, 2011 at 12:47 AM
Sounds fine to me. Sounds like you've got it planned out in a logical programmer-type way and basically just have to hit the grindstone and type it out.
Only thing is this: If your character is physics-driven, you should really consider using Collision rather than Trigger. This way you can get all sorts of information about things to polish the experience.
For instance, do you want to trigger a wall slide even if the player slams into the wall at high speed? Shrug You may want to bust your nose and go reeling back. Granted, this only happened to Mario when he long jumps into a wall, but. You may need that collision force data, which you won't get from OnTrigger.
But most importantly, you can acquire hit normals from an OnCollision, and use them to determine the angle of the object you hit, effectively making a "dynamic" wall-jump where you can wall-jump off any 90 degree surface. Whether this is what you want or not, can't say. Because you could also accomplish this by tracing a ray from the character to the wall, and determine that way if it hit a 90 degree angle.
that is a really good idea :) i will give that a try thanks :)
If you get stuck grabbing data from a collision, just remember that if you use 'OnCollisionEnter(Collision hit)', you'll be able to get all your collision info from 'hit' or whatever else you name it. Auto-complete in Visual Studio will help you out with manipulating all the 'hit' data.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Increase Jump Through Mouse Clicks? 1 Answer
Simple wall jump 0 Answers
Simple wall jump? 2 Answers
please i beg of you help!!!!!!!!!!!!!!! 2 Answers