#ledge problems

1 messages · Page 1 of 1 (latest)

celest marlin
#

i'm trying to make it so that when the character in my 3d platformer grabs the ledge of a moving platform, they follow its movements, but as of now it doesn't follow the velocity of the platforms rotation and i'm not sure how to include the angular velocity.

night summit
#

Think as that way it will be easier

celest marlin
night summit
#

Nah don't try to give same velocity to player

#

Player should be 'attached' to ledge

celest marlin
#

i tried that

night summit
#

Tried what?

celest marlin
#

i'd need to figure out how to set up the offset then, right?

night summit
#

You could just make player as child of the platform, that is an option

celest marlin
#

no

#

bad idea

night summit
#

Not really, depends on your game

celest marlin
#

i dont think it'll work in this case

night summit
celest marlin
#

i just tried it and it didnt work

night summit
#

What do you mean 'it didn't work'

#

You can take video or something

celest marlin
#

my character didn't grab the ledge

#

when the moving platform rotates, my character slides off

night summit
celest marlin
#

its not following the platforms rotation in velocity

celest marlin
#

i don't want to have to resort to using another component

night summit
#

That is very questioning response

#

Then you can calculate player position with TransformPoint or w/e

celest marlin
#

tried this once

night summit
celest marlin
#

thats what i use to set the position when it starts grabbing the ledge, but since my only way of lining it up is by subtracting from the y axis, using it to set its position outside of at the start isnt an option.

#

the start of the ledge grabbing state, that is

night summit
#

Then just apply it every frame

#

Which is basically same as parenting/fixed joint

celest marlin
#

i cant

#

he would be pushed to the floor

fiery pagoda
#

are you using Rigidbodies?

celest marlin
#

yes

fiery pagoda
#

then you should set those rigidbodies to isKinematic if you are manually modifying their position

#

I would do that or as cathei suggested, a FixedJoint

celest marlin
#

they are though

fiery pagoda
celest marlin
#

yes but thats why i was trying to use velocity

fiery pagoda
#

on kinematic or non-kinematic rigidbody?

celest marlin
#

kinematic

fiery pagoda
#

what is PhysicsMover and what does that have to do with Rigidbody or isKinematic?

celest marlin
#

its used to move the moving platform

fiery pagoda
#

If isKinematic is enabled, Forces, collisions or joints will not affect the rigidbody anymore. The rigidbody will be under full control of animation or script control by changing transform.position.

celest marlin
#

i already said it has iskinematic on

fiery pagoda
#

then why are you applying forces to it/changing it's velocity?

celest marlin
#

because i cant set the position without subtracting from the y axis

fiery pagoda
#

youre missing the point

celest marlin
#

am i?

celest marlin
#

is that saying i cant change the velocity?

fiery pagoda
#

yes

celest marlin
#

i have something called KinematicCharacterController

#

it being kinematic isnt important to the issue

#

i need to know how i should add the angularVelocity of the platform to the character

#

hello?