in c# you can’t directly alter one component of a vector2/3, you have to do the original approach, create a new vector changing/carrying over each value.
@Rostam24 , you appear to be using unityscript, that does allow you to directly alter one component.
directly altering the position of a transform (by any method) means you are making changes to the gameobject without the physics engine; hence causing the problems with the rigidbody.
ive got a tile based 2d map for platforming my character is 1 by 1 tile.
I want to include passages with holes. Speaking of walls with 1 tile holes. The player just bypasses them when jumping or falling beneath them.
I tried to hide a smaller collider wich fits in and deactivating the normal one whenever the player is in the air.
but then he gets stuck at one edge what is fixed by rounding the y position while he is on ground.
that however created the issue with the rbody then
@LeftyRighty , I code in C#, so I’m not entirely sure what you mean. From what I understand, Vector2/3 is a struct, so var p = transform.position is the same as var p = new vector3(transform.position.x, transform.position.y,transform.position.z);
However, I’m not sure, so let me know if I’m mistaken
I fixed it by myself by simply not updating Y all the time and just when its needed for about 2 frames.
As this is a very specific problem a explanation is not possible/needed