#using System.Collections;using System.Co...
1 messages · Page 1 of 1 (latest)
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
Yeah it seems like the problem is the add force
Could be the force being too weak
rb.AddForce(Movedirrelative.normalized * Force * 5f, ForceMode.Force);```
Is there a problem with the forcemode?
No, I think that's the default one.
movedirrelative seems fine as well
Movedirrelative = orientation.forward * movedir.z;```
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
The value of force remains the same, when the plr is in the air and does not strafe.
Inputs are also disabled until the plr airstrafes
if the plr airstrafes then force is increased by 0.04
and the plr can move in any dir they want
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
I gotta go for now, but I'll resume looking for possible errors after lunch
I think its bc of me holding A or D?
Since I was moving perfectly in the air when I was holding W
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
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
negated as in ignored or reversed ?
why should they if the character can't move on the side ?
Ignored
Because I want to simulate airstrafing, and airstrafing is basically the plr moving left and right in the air using their a and d keys but it only changes the direction of the forward vector
So you should apply rotation to your character with your X axis