#ASDF

1 messages · Page 1 of 1 (latest)

neon rapids
#

what input makes it jump?

mossy glen
#

spacebar

neon rapids
mossy glen
#

1 sec

neon rapids
#

can you send the script too?

woven sluice
#

@neon rapids In the future, don't set the thread timer past the 24 hour time.

mossy glen
#
public void Jump(InputAction.CallbackContext context)
    {
        if (canJump)
        {
            if (context.performed)
            {
                lastJumpTime = jumpBufferTime;
                Debug.Log("jump");
            }
            if (context.canceled)
            {
                OnJumpUp();
            }
        }
    }


neon rapids
#

like the whole script?

mossy glen
#

there is a link to it in the original message

neon rapids
#

kk

mossy glen
#

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

neon rapids
mossy glen
#

13

neon rapids
#

try make it 5

#

see if it would work better

mossy glen
#

the player barley jumps

neon rapids
#

8?

#

just adjust the value until you get the desired jump height

mossy glen
#

the jump force or the wall jump force

neon rapids
#

the jump force is too high as the video showed so the jumpforce

#

did it work?

mossy glen
#

the jump force has nothing to do with the wall jumping

#

wall jumping has its own force

neon rapids
#

i know

mossy glen
#

and it is jumping higher than the wall jump force i set

neon rapids
#

your problem is with the jump force,right?

mossy glen
#

when i wall jump

#

it is fine normally

neon rapids
#

so the jump force or wall jump is your problem?

mossy glen
#

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

neon rapids
#

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

neon rapids
mossy glen
neon rapids
#

so you wanna use physics?

mossy glen
#

kinda

neon rapids
#

kk

#

I'll see what i can help since i am unfamiliar with the new Input system of unity

mossy glen
neon rapids
#

kk

mossy glen
#

when spacebar is pressed context.performed = true and when it is let go context.cancelled = true

neon rapids
#

sure

mossy glen
#

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

neon rapids
#

um......

mossy glen
#

...

#

is the um for what i sent or did you find something?