#idk

1 messages · Page 1 of 1 (latest)

mental aurora
slate field
#

thanks

mental aurora
#

The character's position is like 100, 500, 1000

#

or something

#

Is your map that big?

slate field
#

yea

#

it's not just 1 tile

mental aurora
#

ok that makes sense

#

but why is it so high up?

slate field
#

idk

#

but when i go off a slope. (you can see the hills and stuff) when i go of one of them it just float's

mental aurora
#

up?

slate field
#

no

#

straight

mental aurora
#

ok

slate field
#

doesn't go down a hill as you'd expect

mental aurora
#

ye

#

I really think the solution is simple, but can't figure it out

#

hmm

slate field
#

sameeee like i thought bout adding gravity to it but idk if u can do that

mental aurora
#

Actually

slate field
#

and since this is my 4th day on unity idk much

mental aurora
#

go to edit>project settings>physics

#

then at the top there'll be a Vector3 that shows gravity

slate field
mental aurora
#

try making the y be something like -100

slate field
#

nope

mental aurora
#

huh

slate field
#

doesn't work

mental aurora
#

wait maybe the char controller freezes rigidbody in playmode

#

press play, then pause it, and check the RB's values

slate field
#

they stay the same

mental aurora
#

If that doesn't work, I think you'll have to try making your own gravity or ask a question on Unity Answers

slate field
mental aurora
#

OMG I SO DUM

#

I actually had this problem once

#

It's not the Rigidbody's fault, it's the animator's

mental aurora
#

I think

#

Are you using animations/

#

?

slate field
#

i dont think so

mental aurora
#

I think that character controller needs animations

#

I'm not sure

slate field
#

i dont think i am using animations

mental aurora
#

try pressing ctrl+6

#

then select the player obj

slate field
#

nothing there

mental aurora
#

huh

#

ok

#

ok

#

try

#

wtf

#

It not letting me paste code

#

or send code

slate field
#

dm it to me if u want

mental aurora
#

no

#

wait

#

one sec

#

if(!controller.isGrounded){

#

direction += Physics.gravity

#

}

slate field
#

can you not send it in a this?

mental aurora
#

I tried using backticks but when I did it would send and then dissapear

#

I think I misspelled that

#

if(!controller.isGrounded){ direction += Physics.gravity }

#

finally

slate field
#

what do i do with that?

mental aurora
#

put it in update right after you declare moveDir

#

instead of direction use moveDir though

slate field
#

like this?

mental aurora
#

no put it before controller.Move

#

If that doesn't work I give up

slate field
#

Ready to give up lol

mental aurora
#

mhm

#

Does it work?

slate field
#

nope but i put it in like this

mental aurora
#

switch direction for moveDir

slate field
#

it works but when i let go of w it floats up a little

mental aurora
#

hmm

#

I'm getting closer

#

can you send picture/video?

slate field
#

yup

mental aurora
#

thx

slate field
mental aurora
#

ok try commenting out the if statement

#

//if(direction.magnitude >= 0.1f)

slate field
#

?

mental aurora
#

add // at the beginning of the if statement

slate field
mental aurora
#

ye

#

also do the same thing to the brackets that surround the stuff inside the if statemant

slate field
mental aurora
#

wait I just realized

#

wrong if statement

mental aurora
slate field
#

im lost

mental aurora
#

ok

#

um

#

can you send the text of the script

#

not img but copy paste the text

#

ye I had the same problem

slate field
#

bruh 😭

mental aurora
#

try it without code tags

slate field
#

we can use this

#

i pasted it there

mental aurora
#

true

#

replace your code with this

slate field
#

i got this error

mental aurora
#

maybe?

#

ok be back in 5 min

slate field
#

nope

mental aurora
#

ok I'm back

mental aurora
#

it doesn't work?

slate field
#

nope

mental aurora
#

ok

slate field
#

the one before did

#

but your recent change didnt

mental aurora
#

mm it doesn't say if

#

(controller.isGrounded){}

#

line 29

slate field
#

what

mental aurora
#

on line 29 add if before the bracket

#

or copy paste this

slate field
#

Done there's no error's in that

#

BUT it's moving without me even pressing w

mental aurora
#

wtf

#

hmm

slate field
#

YESSSS IT WORKS LET'S GOOOOO

#

Bro you're a genius

mental aurora
#

It took 40 mins but yay

mental aurora
slate field
#

atleast it works 🙂

#

oh one last thing

#

its a small thing

#

lmao

mental aurora
slate field
#

😭

#

anyway lmao when i move my mouse left it moves the camera right and when i move it right it move left

mental aurora
#

Can you send the code when you move the camera

#

where not when

slate field
#

there is non there's just that character movement script

mental aurora
#

hmm

#

try that?

slate field
#

Nope

mental aurora
#

I'm kinda guessing by now but if that deosn't work then post question on Unity Answers

slate field
#

Alr welp it didn't work as expected

#

it's a little jittery when i move

mental aurora
#

ok but does it go in the right direction

slate field
#

do you have any clue on how to make it jump .-. or is that a separate thing

slate field
mental aurora
#

I think this should fix jittery movement

slate field
mental aurora
slate field
#

Alr

mental aurora
slate field
#

i can't move left or right

#

and the camera seems odd

#

idk how to describe it but it feels odd

mental aurora