playMaker

Author Topic: why no gravity w/ controller , no gravity w/ raycast?  (Read 2031 times)

joshiwu

  • Playmaker Newbie
  • *
  • Posts: 6
why no gravity w/ controller , no gravity w/ raycast?
« on: August 21, 2015, 01:29:14 AM »
when my character is in the 'run' state he cannot fall, and if he does fall, it is very slow, and when he does land he tends to teleports to where he started his trajectory, then maybe falls a second time, then turns stateless often accompanied with "loop limit exceded " error which pauses the game.

X_X im such a noob. it works fine in 'walk' state so it must not be the controller. right? the only diference between the two is i havent added the raycast and booltest (to serve as "controller landed" which i havent figure out yet either.) to walk state yet.

so i made a cube and put  arigid body on it & it fell. i put a controller on it & it locked on the y axis. deleted the controller & it fell again. I am stressed,someone save me.

-Joshua
www.stonecoldlogic.com

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: why no gravity w/ controller , no gravity w/ raycast?
« Reply #1 on: August 21, 2015, 02:48:04 AM »
Hi,
you are having a loop between states witch are called 1000+ time in a single frame

so what i mean is for some reason you have 2 states (or more) jumping back and forth 1000+ times in a row in a single frame

it might be the bool test or the raycast making it loop, try adding a wait in between for testing and to see what i mean

joshiwu

  • Playmaker Newbie
  • *
  • Posts: 6
Re: why no gravity w/ controller , no gravity w/ raycast?
« Reply #2 on: August 21, 2015, 04:40:19 PM »
yeah but the loop is a side effect to my main question. not my actuall quesstion. its bouncing between the walk and fall state +1000 times. but like i said, this is more of a symptom than the actual problem itself. I had a feeling people would address that part of my post as if it were my question.

but if you read it again my questio is about gravity, and why i cant make it work sometimes.

Hi,
you are having a loop between states witch are called 1000+ time in a single frame

so what i mean is for some reason you have 2 states (or more) jumping back and forth 1000+ times in a row in a single frame

it might be the bool test or the raycast making it loop, try adding a wait in between for testing and to see what i mean