@KindosaurGaming said:
@TwistedTwigleg I have been trying for a few days now to see if I was able to see the line of code that detects the Z and X velocity but with no succes really.
Do you mind sharing the code? I do not know if I'll spot anything, but I can try.
Or a sample project would be even better, as that way I could try modifications and run the project to see the results.
Unfortunately, my schedule is really busy right now, so my ability to help is probably going to be very limited in the near future. I'm hoping things will clear up a bit soon though.
The only things that I found was that:
- Vector3.ZERO
is a different way of saying Vector3(0,0,0)
Yup!
- By repeating my steps again (and this time make my
move_speed
slower) I saw that this bug was now only affecting my diagonal jumping meaning that there is indeed a line of code (probably the Velocity
) creating this bug
Maybe the code for figuring out the direction the player is moving in has a y
component to it, and so it is modifying the strength of gravity based on the camera angle? I don't know if that is the case, but it might be something to look at.
Maybe try canceling the Y value in view_camera_forward
and view_camera_right
after they are defined/set:
var view_camera_right = view_camera.global_transform.basis.x
var view_camera_forward = view_camera.global_transform.basis.z
view_camera_forward.y = 0
view_camera_right.y = 0
I'm not sure if that is causing the issue, but it might be something to try.
- By removing that part I also saw that my character is infinitly accelerating (meaning that I need to add a
const MAX_SPEED
) and the character doesn't stop moving in that direction and accelerates when pressing to a diverent direction
Hmm, strange. I'm not sure what would be causing this issue right off.
- Apparently the gravity is hereby effected to (don't know why)
Gravity is affected by diagonal movement? If so, that might suggest that the issue I mentioned above, that the view camera is modifying gravity, is the issue. It is not a guarantee, but it definitely seems possible.
- When I fall of a platform it will drop me instantly so no acceleration just an instant drop just because I tinkered with the GRAVITY a bit
I'm guessing, but this is probably due to the increased gravity. You may need to disable increase gravity or reset it when the character is standing on a platform.
- The camera isn't (luckily) the part of any bugs / glitches when jumping around nor is does it take part in the extreme acceleration of the character
Great! That means whatever the issue is, it is not there. That should make it a little easier to narrow down what is causing the issue.
During the writing of this I am now able to JUMP in all 8 directions normally. But with weird properties seen above.
SOo.. We are getting close to the solution :P
The bugs (seen above) might be simple to fix I hope
I think they should be easy bugs to fix, it just might be somewhat difficult to find what is causing the bugs. With enough debugging and tinkering, I'm sure the bugs are fixable! :smile: