x


Wall Jump script

Im making a 3d game on a 2d plain, i have a moving character who can jump but im looking for a wall jump stlye script. But i am a terrible at code the best i can do is figure out wrong syntax so i was wondering if any one could point me in the right direction on how to make one?

more ▼

asked Jan 01 '11 at 01:52 PM

Figalot gravatar image

Figalot
13 1 1 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

sorry, but You're going to have to code it. There's really no way around learning to code in unity.. Thankfully however, it's an amazingly easy way to start learning how to code.

my first (and verryyyy hacky) project, "I am the night", (http://www.greenergrassgames.com/iamthenight) used wall jump this way:

first of all, i used a switch in my code to build a state machine to track the player's current state (grounded, airborne, wallsliding)

the character had a box colider that stuck out in front of him a tiny bit, and that followed him around. this was set to "use trigger". if this trigger object ran into an object tagged as "wall" while the character was in his "airborne" state, AND the player pressed against or away from the wall with his arrow keys, the character would enter a "wallsliding" state -- where he quickly flips around 180 degrees, plays a "i'm sliding down a wall" animation and falls down vertically very slowly. if the user hits jump in this state, the character springs away from the wall with a simple add force function and plays a wall-jump animation. he then goes into the airborne state, ready to hit another wall.

hope that isn't too confusing. there are probably better ways to do it.

more ▼

answered Jan 01 '11 at 06:58 PM

hypnoslave gravatar image

hypnoslave
436 12 16 25

How do you make the character stick to the wall and slide down slowly? Normally I would get the collision contact point, invert the normal and add a constant force in that direction. However I have rotating wall and I dont't know how to make the player slide down slowly (wherever "down" is while the wall rotates).

Jan 15 '12 at 03:16 AM Nicolinux
(comments are locked)
10|3000 characters needed characters left

If you want him to "Climb" over the wall, your going to have to animate it...

But you might want to define: wall jump.

Happy new years, and hope this helps =).

more ▼

answered Jan 01 '11 at 05:10 PM

Justin Warner gravatar image

Justin Warner
6.3k 19 27 65

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

x3317
x1032
x531
x453
x335

asked: Jan 01 '11 at 01:52 PM

Seen: 3044 times

Last Updated: Jan 15 '12 at 03:16 AM