#angles in platformers

1 messages · Page 1 of 1 (latest)

weary lodge
#

Hmmmm I'm not sure. Maybe that's the shape you need to add to the polygon collider component

brittle wing
#

no its using a tilemap collider

weary lodge
#

is that particular sprite set to use the composite collider?

brittle wing
#

its in a tilemap for the stairs

#

and i set the composite collider there
\

weary lodge
#

hmmm I'm not sure then

#

the player hits it and just stops?

brittle wing
#

yep

weary lodge
#

maybe it's hitting another corner in there

#

like form the brick floor the stairs lead to

brittle wing
#

when i reduce the gravity

#

it allows me to go up

weary lodge
#

because it looks like it's getting somehwat up the stairs

brittle wing
#

but then the gravity is too low

weary lodge
#

hmmmm

#

try toggling on your gizmos in the scene preview

#

see how my stuff has a green outline?

brittle wing
#

yeah theyre on

weary lodge
#

can you send me a close up of the collider shape around the stairs?

brittle wing
weary lodge
#

hmmmm

#

so the bricks don't even have a collider?

brittle wing
#

no theyre on a different tilemap

weary lodge
#

ah, can you show that one?

#

maybe there's a clue there

brittle wing
weary lodge
#

ok, so I can see how that's gonna stop your player going all the way up the stairs

brittle wing
#

yeah i see it too but it doesnt stop it all the way

weary lodge
#

I'm not sure how the capsule collider handles it though

brittle wing
#

only the end

#

shouldnt*

weary lodge
#

yeah, it's stopping before it gets up that high, right?

brittle wing
#

no it doesnt walk up at all

#

when i turn the gravity down its able to walk up to that point

weary lodge
#

hmmmmmm

#

what about the rigid body of the player character?

#

here's mine

brittle wing
weary lodge
#

try setting angular drag to 0

#

as well as linear drag

brittle wing
#

doesnt change anything

weary lodge
#

try making a normal rectangle sprite with a collision body and rotate it 45 degrees

#

then plop your character down on it and see if it works

#

because that was definitely working for me

brittle wing
#

nope

#

same thing

weary lodge
#

hmmmm

#

I've got no clue then

#

maybe use some code to set the velocity manually based on the surface normal?

#

that seems like overkill though

brittle wing
#

like with a raycast?

weary lodge
#

oh hang on

#

yeah

#

but that seems like a mess to try and maintain

#

try throwing one of these bad boys on your tilemap

brittle wing
#

🙁

#

doesnt work either

#

set the composite collider to be used by effector aswell and tried setting the tilemap collider used by effector/composite

#

oh well ill do the raycast ig sorry for wasting your time

weary lodge
#

yeah, the effector should be the platform effector in that case

#

I'm stumped

#

it starts going up but then jump stops?

brittle wing
#

no it doesnt at all

#

i made it so i dont fall off though by setting the player to kinematic when not doing anything

#

removed it and it still doesnt work tho

weary lodge
#

that might be related

#

I'd leave it as dynamic and let the physics engine handle it for you

brittle wing
#

removed it and its the same

weary lodge
#

no clue then

#

usually whne I hit that point, I scrap it and start over

brittle wing
#

what do you use for movement

#

@weary lodge

#

im using rigidbody addforce maybe thats a problem

weary lodge
#

ah maybe. I'm just setting the velocity with a vector

brittle wing
#

wait

#

@weary lodge

#

i just turned up the movement speed by a lot and clamped the x velocity

#

and it works

weary lodge
#

wut