#ASDF
1 messages · Page 1 of 1 (latest)
where's the input part in the code?
can you send the script too?
@neon rapids In the future, don't set the thread timer past the 24 hour time.
kk
public void Jump(InputAction.CallbackContext context)
{
if (canJump)
{
if (context.performed)
{
lastJumpTime = jumpBufferTime;
Debug.Log("jump");
}
if (context.canceled)
{
OnJumpUp();
}
}
}
like the whole script?
there is a link to it in the original message
kk
I got it from a tutorial and have modified it to work with the new input system
I understand how it works mostly but am still new to forces
what's your jumpforce?
the player barley jumps
the jump force or the wall jump force
the jump force has nothing to do with the wall jumping
wall jumping has its own force
i know
and it is jumping higher than the wall jump force i set
your problem is with the jump force,right?
so the jump force or wall jump is your problem?
wall jump
it goes over 8 when i wall jump sometimes
on the y
i did a debug.log on the y velocity
in update
and it sometimes goes up to 20
I tried putting the regular jumpforce to zero and it still does the increased jump height on the wall jump so i don't think both jumps are happening at the same time
can you just use transform.translate?
this would make easier code than forces
Vector2 ASDF = new Vector2(x,y);
Transform.Translate(ASDF);
btw also make a Vector 2 for the "netforce"(can't exactly call it netforce since there is no force in Transform.Translate)and the player would move the Vector2
a variable for the y and a variable for the x
I'll look into this but I would ideally like to get what i have working
so you wanna use physics?
kinda
kk
I'll see what i can help since i am unfamiliar with the new Input system of unity
thanks for helping, really appreciate it!
kk
I can explain it simply if you want
when spacebar is pressed context.performed = true and when it is let go context.cancelled = true
sure
you map the keys here
to events here
that way you can have multiple keys linked to the same event easily
or setup controller support easily as well
um......