Hi all i am trying to make a wall jump like in Mario Galaxy 2 :
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.
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.
answered Mar 30 '11 at 12:47 AM