The player randomly jumps when I move around
to move left and right press the "arrow keys" to press the "z" key.
Press "l" to load a test map
help me out, please.
this game uses the "Windfield" library
the player randomely jumps without me pressing the jump button
Re: the player randomely jumps without me pressing the jump button
The controls are a bit risky but good work and no one will laugh, it's not the purpose of the forum I assure you
However I did not understand:
However I did not understand:
Is this a problem you encounter?The player randomly jumps when I move around
Re: the player randomely jumps without me pressing the jump button
yes, that is the problem that I encountered.
thank you for playing it
Last edited by A-lox on Thu Mar 16, 2023 1:10 am, edited 1 time in total.
Re: the player randomely jumps without me pressing the jump button
sorry I did not mean to comment this(
[quot=Bigfoot71 post_id=253900 time=1678925406 user_id=188439]
The controls are a bit risky but good work and no one will laugh, it's not the purpose of the forum I assure you
However, I did not understand:
[/quo
how would you go about making the controls less risky and less jittery
)
[quot=Bigfoot71 post_id=253900 time=1678925406 user_id=188439]
The controls are a bit risky but good work and no one will laugh, it's not the purpose of the forum I assure you
However, I did not understand:
Is this a problem you encounter?The player randomly jumps when I move around
[/quo
how would you go about making the controls less risky and less jittery
)
Last edited by A-lox on Thu Mar 16, 2023 1:11 am, edited 3 times in total.
Re: the player randomely jumps without me pressing the jump button
Well precisely I did not encounter this problem personally, but it is not due to this L207 from main.lua (?):
I only skimmed the code I didn't go deeper than that, but this line checks the collision with an object of the "jump" class and if the player collides with it, what is it? supposed to mean?
Is this normal, or if it is is it due to an object that is of class "jump" when it shouldn't?
Otherwise for the controls I will simply find the right balance between the left/right velocity and the jump
I also noticed that when jumping when going against a wall (not sure what collision class this is referring to) the character no longer falls due to `setLinearVelocity` with 0 on Y.
You might be able to solve this by getting the velocity on Y upstream and applying that to the new one and applying that X to the new velocity. It's a simple suggestion, give it a try.
Code: Select all
if player.hitbox:enter('jump') then
player.hitbox:applyLinearImpulse(0, -900)
end
Is this normal, or if it is is it due to an object that is of class "jump" when it shouldn't?
Otherwise for the controls I will simply find the right balance between the left/right velocity and the jump
I also noticed that when jumping when going against a wall (not sure what collision class this is referring to) the character no longer falls due to `setLinearVelocity` with 0 on Y.
You might be able to solve this by getting the velocity on Y upstream and applying that to the new one and applying that X to the new velocity. It's a simple suggestion, give it a try.
Who is online
Users browsing this forum: Google [Bot] and 1 guest