Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. when you jump the ray doesnt hit (turns true when you collide with something) so gravity doesnt change (so isjumping will be true but isgrounded will be false)
  2.  
  3. only when youre grounded (touching a surface) will the gravitys change direction, eg. if you are walking up the side of a wall (isjumping will be false and isgrounded will be true)
  4.  
  5. when you walk off a platform you become ungrounded (which casts 5 rays one in each direction except up, if isjumping is false) then as you fall the ray hits the side of the platform and the rotation works in reverse so if you walk off forward the back ray would hit the side of the platform and rotate you forward and change direction of gravity to accommodate walking on that surface
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement