#weird block jump glitch
1 messages · Page 1 of 1 (latest)
do you spam the space bar when jumping?
no im just holding it
use get keydown
you really gotta stop with useless suggestions
ok for the isGrounded thing, lets just do something to see where it was grounded.
Add this
isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);
if(isGrounded){
Debug.DrawRay(groundCheck.position, Vector3.up, Color.red, 1f);
}
typed on discord so lmk if any errors
actually change the direction so its not up, do like -Vector3.forward and increase 1f to maybe 5f
why not use the isgrounded default by charact controller?
and just to note: if you follow any of keni's suggestions im gonna go to bed because its a waste of time
-Vector3.forward...
,':/
does that one not work, im just typing on discord so idk the exact code off hand
yea it is
again, just typing this on discord. I dont remember every property of vector3 😛
oh i think the block (wall) is triggering the igrounded to true
@cold sentinel
i assume if you rotate the camera, none of those are in the air
but check to be sure, not having depth perception is a rough thing
they're in the air but only because my player is a little capsule guy and so he is also floating in the air
Are you sure friction didnt work, when i suggested it (in the middle of keni repeating bounce), i never asked if you set the friction combine to "minimum"
just a question holo, did you try the isgrounded by character controller??
mmmm
does the physic material have to be on both the player AND the mesh? or just the player
Just the player
player
im just hesitant to suggest this because you said you put it on the player and mesh before and it didnt work
0
friction really is a pain in unity lol
i did but i didn't set it to minimum (im really a noob when it comes to physic materials sdfjkhfd)
the minimum is between collision
if its on the player and mesh, both with 0, the average is 0
same result as before unfortunately
can you show how you set it
try lowering the value of radius of the checksphere
ok tbh what I would do at this point, assuming there isnt any other code in the project, is add debugs to log whats affecting the velocity.
Like a debug after every possible change in velocity, then get the bug once and go through those debugs
so thats why we cant solve it
hm okay
i dont think its an issue with the checksphere, the checksphere doesn't ever collide with vertical walls
You can even just debug the y component
then whats triggeringthe isgrounded
most likely the floor
when the player gets bugged downwards
it's physically impossible for the checksphere to collide with a vertical wall because the radius is way smaller than half the width of the player
Mmh.
I'm not very familiar with characterController but I wonder if splitting the vertical and horizontal move like that could cause it to somehow fight for control with itself.
If you could somehow combine the two and use .Move just one per update loop, I wonder if it'd do anything differently.
But I'm kinda grasping at straws here.
Damn I was about to type that too I just noticed u have 2
welp the last thing i can recommend is to use isgrounded for character controller
Good, does this mean u wont suggest anything useless anymore?
icl bois i just copy and pasted the code from a brackey's tutorial and tweaked the variables
i really hate writing movement code sfdjkhsfdh
Definitely combine the controller move into one just by storing the vector and adding to it based on the different directions
I thought it was one move, which is why I said debug just the y component
vector2 for x and z only or vector3?
i think because of this
if(isGrounded && velocity.y < 0)
velocity.y = -2f;
the velocity variable already is a vector3
You still use vector3
lemme get rid of it n see what happens lmao
Yea controls that don't use .AddForce can be pretty challenging to get right.
But also lead to snappier movement. Mh.
no i think not
im not gonna lie to you guys, i removed it and that changed nothing
my movement is the exact same as it was before
u sure the isgrounded trigerring the floor not the wall??
^
wdym a normal block collider?
like a box collider?
genuinely not possible with the setup i have sdfjkhsdfh
my chunks are 1 whole mesh
(made that way so that inside faces don't have to get rendered)
That should still be fine as long as the collider bounds are proper.
And much more performant than having a bunch of split meshes
im not sure what you mean by split meshes?
what u mean
A bunch of individual meshes is slower to render for unity than 1 combined mesh of the same parts
Also seems like this thread has somehow gone off topic. I really dont wanna be bothered correcting other peoples incorrect solutions
💀
My final suggestions are combine the movement to 1 controller.move
If that doesnt work, print what the y component is and try to manually catch out when the value isnt what it's supposed to be.
do i just add them together?
yea try charactercontroller.isgrounded because it works different than checksphere
You would need to combine the vectors into one. Have a vector for your horizontal movement, multiply that by speed.
Add your y component after, so it's not multiplied by movement speed
I'm kinda confused by how it's seemingly unaffected by you commenting out the bit that sets velocity for faster fall.
Uh. Is your character's RB's gravity set to 0?
Or is it using both physX gravity and your own at the same time?
...but yea I still think combining the moves might make a difference, as I said earlier.
rb?
Rigidbody
rigidbodty
im using a character controller not a rigidbody sdfjkhfsdh
Oh right, it takes it's place my bad.
i think u shouldnt combine controller to rb
Again, bunch of off topic clutter in a thread for someone trying to get help
gravity on rb wouldnt work either
no worries im blocking most of it out sdfjkhfds
i am doing that combining thing you said though so nw
im putting all the source code on github! (although i haven't released this most recent stuff yet)
https://github.com/Kahoneki
@cold sentinel ahh! thank you it worked :]
@zenith beacon found that like 30 seconds before me :p thank them
I was literally typing the 2 controller thing when they sent the message lol
ahh sorry sdfjkhsdhf
I charge 30 usd/hour for lessons with personalized plans
😱
💀
I do tutor, scamming 30 isnt worth when I could just tutor and make 300 lol
Yes I'd rather not commit a literal crime. If you are serious then send a dm request. I'll get to it later because I'm going to bed
Crime in reference to scamming
This isnt the place to discuss, dm if you are serious. Otherwise dont waste time please