What have I done wrong? (Programming quick start))

I actually had this problem too, everything looked perfect yet it refused to bob up and down.

I simply restarted Unreal Engine and then tried again and it worked after that.

I’ve done the tutorial, though my actor does not jump. Or lift or move or whatever that is expected for it to do. I copied and pasted the sample code too and it till doesn’t work.

May it have to do because I chose mobile development at project foundation?

The code is really basically same as the tutorial code, copy paste, no build or compile errors. In preview/game the sphere is immobile. And it is marked as mobile in editor.


This part doesn’t work for me and I have no clue why.

Do you happen to have a root component? Did you change the code?
In some cases you can’t change the position of your actor.
Also what is the result of the SetActorLocation Component? It returns a boolean. False indicates that the location is not changed.

This is the implementation of the SetActorLocation function:

bool AActor::SetActorLocation(const FVector& NewLocation, bool bSweep, FHitResult* OutSweepHitResult)
if (RootComponent)
const FVector Delta = NewLocation - GetActorLocation();
return RootComponent->MoveComponent( Delta, GetActorRotation(), bSweep, OutSweepHitResult );
else if (OutSweepHitResult)
*OutSweepHitResult = FHitResult();
return false;

bSweep is false by default

OutSweepHitResult is 0 by default

If there is no Root Component your actor won’t move. As i see in the example code there is no Default Root component. So you have to create one in order to make your actor moving.

I belive this is the issue. But without code i can’t say anything for sure.

Thanks for teaching me this- even though its nott related right now, restarting worked.

Thanks again though!

I tried making it work for an hour straight, dammit.

Worked, thanks.