The rolling ball seems to be offset from its transform

Hello, this is something annoying and not obvious. In the BP_PlayerPawn blueprint, the PlayerMesh (the ball) is the root component, and as such, its location and rotation aren’t editable. The centre of the ball is 50cm above the “ground” in this blueprint, and I can’t see a way of changing that while keeping the ball as the root component.

This is a problem because, when the crystals lerp towards the ball’s transform location, that transform location is on the surface of the ball (where the ball rests on the “ground” in the blueprint) rather than at its centre, where I’d like the crystals to Lerp to.

I tried to add something else (a point light) as the root component, so I could move the ball down 50cm and have the transform be at its centre, but because no force is ever applied to that light component and it never moves, the crystals just always lerp on collection to (I think) the player start position.

What’s the best solution for fixing this? It’s just an aesthetic problem here, but there could be times when it’s more serious. What do people do if they need the transform position of a blueprint actor to line up with the centre of the root component in a situation like this? One way I thought of was to add some kind of empty or null transform component to act as the central transform of the ball, make it a child of the ball, and then somehow get a reference to that null component in the Crystal blueprint plugged into “GetActorLocation” instead of “GetPlayerPawn”.

  • My two problems with this are - is there some kind of empty transform component in blueprints to do this with?
  • Is it acceptable to reference a child in another blueprint like this, even if I figure out how to do it?

Otherwise, what’s the recommended solution?

I’m having the same problem and it bothers me a lot! i tried to import a new ball from blender with the origin in the middle but it didnt work properly… the ball started jumping if it went to fast.
I hope you can figure it out because i have no idea how to fix it :frowning:

In the end, i positioned a point light at the centre of the BP_PlayerPawn sphere, then I changed my MoveToPlayerTransform function so that it casts to BP_PlayerPawn and then gets the point light location as the end of the Lerp. It worked for me, and from what I can tell, this is nearly an acceptable way to do this, with the only change being that there’s probably a better component to use than a pointlight, maybe use an arrow component instead.


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