#using System.Collections;using System.Co...

1 messages · Page 1 of 1 (latest)

hard nebula
#

We'll make less fuss in a thread

#

Did you try logging the force you're applying when your character is not grounded ?

#

If your input is correct, and the function is called, what remains seems to be the force applied

foggy swallow
#

Yeah it seems like the problem is the add force

hard nebula
#

Could be the force being too weak

foggy swallow
#
 rb.AddForce(Movedirrelative.normalized * Force * 5f, ForceMode.Force);```
#

Is there a problem with the forcemode?

hard nebula
#

No, I think that's the default one.

foggy swallow
#

movedirrelative seems fine as well

#
 Movedirrelative = orientation.forward * movedir.z;```
hard nebula
#

Yep

#

What is the value of Force when you're airborne ?

#

I remember you storing the grounded velocity but i'm unsure of the value when the action happens

foggy swallow
foggy swallow
#

if the plr airstrafes then force is increased by 0.04

#

and the plr can move in any dir they want

hard nebula
#

Just to make sure that's not the force being to weak, trying increasing the force while airstrafe by a larger amount

#

like by 40

#

maybe 400

foggy swallow
#

nope

#

really weird

hard nebula
#

I gotta go for now, but I'll resume looking for possible errors after lunch

foggy swallow
#

I think its bc of me holding A or D?

#

Since I was moving perfectly in the air when I was holding W

hard nebula
#

oh, so it would be only on the side ?

#

does airstraffing only become false when you touch the ground ?

#

if that's the case, when you're not grounded, you're currently ignoring X axis and that should explain why you can't move with A or D in the air

#

Line 184

foggy swallow
#

Hmmmm

#

this is really weird

#

So cs Movedirrelative = orientation.forward * movedir.z + orientation.right * movedir.x; i was using this line

#

regardless if the plr was airstrafing or not and it worked!

#

but its really janky

#

I only want the z dir to change directions and the x dir should get negated

#

but the plr still should hold a or d in the air

hard nebula
#

negated as in ignored or reversed ?

hard nebula
foggy swallow
foggy swallow
hard nebula
#

So you should apply rotation to your character with your X axis