#ledge problems
1 messages · Page 1 of 1 (latest)
So the player suppose to follow the position they grab?
Think as that way it will be easier
i tried that
Tried what?
i'd need to figure out how to set up the offset then, right?
You could just make player as child of the platform, that is an option
Not really, depends on your game
i dont think it'll work in this case
You should explain Why so I can give better answer
i just tried it and it didnt work
my character didn't grab the ledge
when the moving platform rotates, my character slides off
Why does it slides off, you can fix the character's localPosition while it is holding
its not following the platforms rotation in velocity
You could do this https://docs.unity3d.com/Manual/class-FixedJoint.html
i don't want to have to resort to using another component
That is very questioning response
Then you can calculate player position with TransformPoint or w/e
tried this once
And what does that suppose to do
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
So you save relative position and rotation to the player from the platform
Then just apply it every frame
Which is basically same as parenting/fixed joint
are you using Rigidbodies?
yes
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
they are though
then it's your script pushing it to the floor, if the rigidbody is kinematic
yes but thats why i was trying to use velocity
on kinematic or non-kinematic rigidbody?
what is PhysicsMover and what does that have to do with Rigidbody or isKinematic?
its used to move the moving platform
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.
i already said it has iskinematic on
then why are you applying forces to it/changing it's velocity?
because i cant set the position without subtracting from the y axis
youre missing the point
am i?
did you read this?
is that saying i cant change the velocity?
yes