Get Actor Transform doesn't seem to be updating

This might seem a little weird and I’m missing something obvious but I’m trying to get the updated Actor Transform of my controlled pawn, but the transform coordinates generated don’t seem to update at all even though my avatar moved in the map space.

This is how I’m getting the transform.
image

Thoughts? Is there something bugged?

What you’re showing works fine under regular circumstances. I’d look for bugs where we cannot see or investigate the circumstances.

Can you zoom out?

This doesn’t show enough information.

Sure, was doing a tutorial on implementing a basic targeting system and it had you spawn a sphere to grab overlapping actors centered on the player’s character/pawn etc.

I’ve also tried an event tick based check separately using the Get Controlled Pawn → Get Actor Transform setup outputting to a print statement and the coordinates never change - always printing out where the player controlled pawn/character originates.

Are you saying that you’re doing:

In the Player Controller assigned to the current Game Mode and not seeing:

That’d be curious indeed.

Get Controlled Pawn → Get Actor Transform setup outputting to a print statement and the coordinates never change - always printing out where the player controlled pawn/character originates.

Are you possessing that Pawn?

When I do this, the debug sphere appears way back at the spawn point, and displays the numbers offset by a lot (but the coordinates don’t change, still stuck at spawn point). It’s really peculiar in that while my thing is moving, the debug stuff is at the spawn!

Yes I am possessing the object and assigning the player controller to it as soon as I do as well. Very odd. Mind you, this is in the level’s Event Graph kicked off after Event BeginPlay but I don’t think it would make any difference.

You can only possess pawns, is what you’re spawning a pawn? Probably.


If you print the display name of this pawn:

image

Does what you get make sense?

Also, how do you move this newly spawned and possessed Pawn?

Yup, what I get makes sense. Yes, I am spawning a pawn and possessing it.

Moving this via vectored flight cobbled together from another tutorial for a spaceship game (not running around with the default 3rd person character).

Could you explain this? What are the chances you’re moving just a component of the actor instead of the entire actor. This is very doable when the component that is moving is not the root.

Could you show the movement method and the hierarchy of the offending pawn?


Lets say I’ll make a spaceship like so - note the component hierarchy:

The component will move, sure, but the actor will not.

Aha. I think you might be onto something. I am indeed manipulating a scene component and a static mesh component (using Set Physics Linear Velocity - Target is Primitive Component).

Here’s the relevant hierarchy of the “ship” (excluding other things that are attached to it like camera etc.)

image

Ok through your insight I was able to grab the location of the mesh being used as I was flying around. I think I can work from there since I have updated coordinates now. Thanks!

1 Like

Or drag the mesh where the root is. Now they are one and the actor will move with the mesh.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.