# Why does component relative location return to 0?

**URL:** <https://forums.unrealengine.com/t/why-does-component-relative-location-return-to-0/303233>\
**Category:** Cinematics & Media\
**Tags:** relative-location, unreal-engine, transform, Components, question\
**Created:** [January 7, 2015, 3:19am UTC](https://forums.unrealengine.com/t/why-does-component-relative-location-return-to-0/303233 "2015-01-07T03:19:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_cccde76c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cccde76c](https://forums.unrealengine.com/u/anonymous_user_cccde76c)\
**Post date:** [January 7, 2015, 3:19am UTC](https://forums.unrealengine.com/t/why-does-component-relative-location-return-to-0/303233/1 "2015-01-07T03:19:31Z")

</div>

I am trying to set the relative location of a USkeletalMeshComponent (named Mesh1P) which is a property within my custom Character class. I am doing so from my custom Player Camera Manager class.

Within AMyPlayerCameraManager:

```
void AMyPlayerCameraManager::UpdateCamera(float DeltaTime) {
    
    //Get custom character
    AMyCharacter* MyPawn = PCOwner ? Cast<AMyCharacter>(PCOwner->GetPawn()) : NULL;

    if (MyPawn) {
        
        //The new location
        FVector NewLocation = FVector(10.f, 10.f, 10.f);
        
        //Set the skeletal mesh component's relative location to the new location
        MyPawn->GetMesh1P()->SetRelativeLocation(NewLocation);
        
    }

}

```

The code above does apply the new location, however immediately the relative location will return to [0,0,0], even if the original relative location (before SetRelativeLocation() was called) was not [0,0,0].

Why does this happen? How can I prevent this from automatically happening?
