x


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.

more ▼

asked Mar 30 '11 at 12:18 AM

MC HALO gravatar image

MC HALO
878 74 94 111

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 :)

Mar 30 '11 at 12:25 AM AngryOldMan

thats what i have in mind :)

Mar 30 '11 at 12:48 AM MC HALO
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Mar 30 '11 at 12:47 AM

Jason B gravatar image

Jason B
1.7k 29 32 44

that is a really good idea :) i will give that a try thanks :)

Mar 30 '11 at 12:50 AM MC HALO

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.

Mar 30 '11 at 01:02 AM Jason B

cheers dude:) you are great help :)

Mar 30 '11 at 01:12 AM MC HALO
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3740
x1038
x336
x101

asked: Mar 30 '11 at 12:18 AM

Seen: 1846 times

Last Updated: Mar 30 '11 at 12:28 AM