Hi everyone, new Bolt user here.
I'll preface my issue by saying here that I have no programming background whatsoever, but I was interested in tinkering around Bolt to see if I could make some functional games, even if they're pretty simple. So please bear with me here if this is too obvious an answer. I do know some algorithm stuff and the basics of C#.
Anyway, I decided to try and make a basic 3D controller for myself, just learning and experimenting. Currently it's a cylinder, and it can move around and jump (I'm not using physics. I'm doing everything with a Character Controller component and Bolt). And as far as I know, my code is nothing too complex, and yet, the jumping on the character doesn't really make sense. It's far too inconsistent. Sometimes the character jumps the correct height, sometimes a little more (or a lot more!). And it's apparently completely random.
Can anyone shed some light in what's going on? I'm attaching my Macro and a gif of what's going on. But basically my jump works by:
-If the character is grounded, then he has a Y value of "-1" on his moveDirection variable (that's the vector3 that gets multiplied by delta time and fed into the Character Controller Move node at the end of Update);
-If the character is NOT grounded, then the Y value of moveDirection gets the Y value of the Physics.Gravity node added to it every frame.
-Jumping is a simply "if the character is grounded and presses Space" then set the Y value of moveDirection to be the value of jumpForce (an object variable that you can set to increase or decrease the height of the jump).
The rest of the code is pretty much just dealing with GetAxis and other stuff like that for movement (which works fine). But why is the jumping so inconsistent?
Customer support service by UserEcho