# Why does the Construction Script refuse to report component offsets?

**URL:** <https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [April 30, 2020, 8:32pm UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489 "2020-04-30T20:32:28Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [April 30, 2020, 8:32pm UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/1 "2020-04-30T20:32:28Z")

</div>

Here’s an actor with a box component whose relative transforms are untouched. The _Construction Script_ prints the location of the said component. That should print 0s and it does, of course.

 ![300954-component.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/3/d131852ef0ed80a98f85d31e04fc343d73251b4d.jpeg)

Below is an instance of the above actor in the scene, it has the very same component (thin line box) but it is offset by some 55000 uus. The actor still prints 0s when dragged around the scene when firing the _Construction Script_.

 ![300955-relative.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/9/cd97c3f40024e60e6bec7825f2065fe0d6278e20.jpeg)

I was expecting it to print 55000 in Y. It does not 😑

And the 2 questions:

- why is the _Construction Script_ spitting out defaults here, why not account for the offset?
- is this the intended behaviour?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [April 30, 2020, 9:01pm UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/2 "2020-04-30T21:01:00Z")

</div>

Strange on many fronts, a couple being:

1. My construction script prints nothing, which I have read about, and:

2. It does print to the log. Mine prints the offset to the log

( 4.24.3 )

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 8:14am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/3 "2020-05-01T08:14:22Z")

</div>

> My construction script prints nothing

You should have it checked 😉

> Mine prints the offset to the log

I have no beef with printing _per se_ - does it print the correct offset of the instance that is in the scene or the blueprint’s defaults?!

* * *

Perhaps it’s working as intended tbh. I am just looking for confirmation. I can work around quirks for as long as I understand them and are certain it’s not my method that is at fault here.

The ideal resolution here is someone pointing out that I do something incorrectly or that my expectations make little sense.

Anything is welcome, really.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2020, 8:28am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/4 "2020-05-01T08:28:51Z")

</div>

It prints the components relative offset, in the BP. Nothing about the scene of course.

I don’t think what you have there is working correctly though. Does it do the same in a new proj?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 8:41am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/5 "2020-05-01T08:41:01Z")

</div>

> Does it do the same in a new proj?

Oh yeah:

 ![300970-print.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/3/ed34ecbb2c894d03898580a81194634975c6a983.jpeg)

![300981-annotation-2020-05-01-093842.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/2/6c227580d162c5cf3e2a98a8b5fef1a015a15331.jpeg)

I refuse to believe this is a bug - it would have been reported & fixed by now.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2020, 8:44am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/6 "2020-05-01T08:44:05Z")

</div>

I’ve found a great way to uncover what you’re doing wrong ( if anything ), is to make a post in captials like 'MASSIVE BUG FOUND 4.24". The moment any replies and you can’t take it down, then you’ll find what you did… 🙂

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 8:46am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/7 "2020-05-01T08:46:49Z")

</div>

Ahahahaa, that’s ok. I’m a patient bear.

I’ll dig in the bug database, perhaps it was reported but rejected. I’ll post an update for sure whether I find something or not. Btw, the same happens for World Transform - the component reports its world transform in the constructor incorrectly - it reports the actor, it does not account for the local offset at all.

* * *

Perhaps it’s all about the order. The component prints defaults and then the Construction Script applies the transform, moving the component.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2020, 8:58am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/8 "2020-05-01T08:58:00Z")

</div>

Like I say, print doesn’t normally work in contstructor, I’ve seen whole threads on it.

Maybe it’s disabled for a reason. But how did you make it work, is then the question…

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 8:59am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/9 "2020-05-01T08:59:36Z")

</div>

Here it is, in all its glory. It _is_ and _isn’t_ a bug at the same time; and it will not be fixed, sadly:

> **[The Unreal Engine Issues and Bug Tracker](https://issues.unrealengine.com/issue/UE-28690)**
>
> Welcome to the Unreal Engine Issue and Bug Tracker. You can check the status of an issue and search for existing bugs. See latest bug fixes too.

> This is how it has to work since  
> instance component transforms aren’t  
> applied till after actor construction  
> is reran.

And the original issue:

> **[Construction script ignores components changed in the map](https://forums.unrealengine.com/questions/391801/construction-script-ignores-components-changed-in.html)**
>
> Add any component in a actor bp Print relative location in construction script Place Actor in map In the details view select the component and then move it around, the print relative location is wrong This bug prevents quite a lot of things of being...

![300979-broken-logo.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/1/44186548fb923c926528ded9dae0a2a949790c34.gif)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 9:00am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/10 "2020-05-01T09:00:33Z")

</div>

It has always worked for me. I never questioned it. Place an actor in the scene, put print in the Construction Script - drag the actor around.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2020, 9:04am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/11 "2020-05-01T09:04:25Z")

</div>

Hoorah!..

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2020, 9:05am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/12 "2020-05-01T09:05:46Z")

</div>

But does it affect constructer calculations also?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 9:20am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/13 "2020-05-01T09:20:18Z")

</div>

> But does it affect constructer  
> calculations also?  
> Yes, I explained but my comment just got moderated for some reason, we’ll see ;p

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 1, 2020, 10:38am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/14 "2020-05-01T10:38:45Z")

</div>

The easiest workaround I’ve found so far was to use a variable with 3d widget option ticked and use the component as a visual indicator only. Nowhere nearly as nifty but it works fine:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/1/d211d779337243dcad2ed1317c48a63c4e5a1d97.gif)](https://gyazo.com/40d098b5a935963a9f78bdff2bbdd3d7)

* * *

I’d like to find a more modular solution to this as I was hoping to achieve a setup with way more complexity, and fiddling with variables is simply not good enough.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2020, 11:01am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/15 "2020-05-01T11:01:14Z")

</div>

Maybe this explains why a lot of marketplace stuff uses this method.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 2, 2020, 7:24am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/16 "2020-05-02T07:24:01Z")

</div>

Unfortunately yes. I was making a spawner with an exclusion zone based on a component:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/f/15f7ef23c6a5f8a22a69b4417cfec1c44b8ed817.gif)](https://gyazo.com/16efa1fab7ee5c76089ff0f0b5aed1fa)

It works fine in the actor’s viewport, as seen above. But not in the world:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/d/abdc422e4b456c6141626c5156f0ee6e709afb16.gif)](https://gyazo.com/b403ad95b7731d33ae661a214514fb5f)

The component’s location is not taken into account when the _Construction Script_ reassembles instanced static meshes.

I learnt something today, thanks for participating in the process! Somehow I feel this is common knowledge I missed out on at some point 😑

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 2, 2020, 10:05am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/17 "2020-05-02T10:05:56Z")

</div>

It’s uncommon knowlege…

Looks like popcorn 🙂

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 2, 2020, 11:12am UTC](https://forums.unrealengine.com/t/why-does-the-construction-script-refuse-to-report-component-offsets/464489/18 "2020-05-02T11:12:31Z")

</div>

Why was this moderated? No love for popcorn?!
