Download

AddLocalOffset not working as intended

I have this line
CharacterMesh->AddLocalOffset(FVector(0,0, -100), false, HitResult, ETeleportType::ResetPhysics);
When FVector is set (100, 0, 0) it changes position. Same goes for (0, 100, 0). But FVector (0, 0, 100) Does nothing.
Why?

That is moving the mesh -100 on the Z direction (which is up in Unreal, so - is down). Perhaps it’s colliding with a floor?

Changing value to 100 makes no difference, so it probably don’t makes any difference. How can I turn the collision off to make sure?

Use a trigger volume, add a component to it that calls this line of code from your actor when it’s collided with, and move a player start above it so it falls in it when the game starts.

Yes, that’s very semi-code, but without solid understanding of what you’re trying to do or how, this will have to do for now.

Call “mesh->SetCollisionEnabled(ECollisionEnabled::NoCollision);”. You probably want no collision on your skeletal mesh and use the collision capsule for collision. (just a guess)

I used this line on my mesh but it still don’t change its positon in Z axis. Im trying to make my character crouch and I have only hands for mesh. Why isn’t it working?