x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Why is the set relative location offset on my custom meshes?

I'm trying to add an arrow component to my meshes so you can tell which way is forward but for some reason on my custom meshes the arrow is offset by a huge margin.

The meshes's bounds are not that big, I can do float-float to temporarily fix it but this isn't super good cause all my custom meshes are different sizes. Which can sometimes put the arrow in weird spots.

Code

I know it isn't the actor's bounds, scale or extent cause I've checked them and there's other things going on in the code that rely on those being correct to work. The arrow is spawned in real time cause I need the arrow to spawn as the actor follows my cursor before it gets placed. To show which way is forward on the actors.

It's cause the origin point in blender was front center causing the arrow to be offset, if anyone knows how to change the origin in ue4 or account for this pls let me know.

Okay Someone on reddit told me this and it worked, also a way to permanently move the origin point for anyone interested.

"If you open the mesh in unreal there should be on the right an import options section where iirc you can add an offset (usually I use it for rotation and scale). Then under asset actions in the top left there is an option to reimport"

Product Version: UE 4.21
Tags:
more ▼

asked Dec 19 '18 at 04:54 PM in Blueprint Scripting

avatar image

PerCat
23 1 2 6

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

First of all, the box extent might be larger that you can really see;

Second, the house scale may affect that as well. If you made the house and rescaled it, the relative location got rescaled as well. If, for example, your house's scale is 2x2x2, and Box Extent X is 500, the arrow will be placed at X==1000;

Try setting World Location, not relative; but make sure to add Box Location X to Box Extent X.

Alternatively, try dividing the Bow Extent X by the house X scale.

more ▼

answered Dec 19 '18 at 06:11 PM

avatar image

Tuerer
1.7k 11 6 8

avatar image PerCat Dec 20 '18 at 06:33 AM

Well I know it isn't the actors bounds or scale nor could it be the extent cause I made the house with blender and the scale was applied correctly, the bounds are good and I know it's not the extent cause I use the extent to figure out whether or not stuffs overlapping.

If I do any float voodoo it's still messed up.

The closest I could get was getting the actors location and dividing by extent but since my meshes are different sizes it's not very good.

avatar image Tuerer Dec 20 '18 at 06:46 AM

Why do you need to add the arrow at runtime? You can simply add an Arrow Component to the house and manually place it wherever you want.

avatar image PerCat Dec 21 '18 at 05:37 AM

It is a component. You gotta add it at runtime cause its on every mesh that you can place in game. Buildings/naturey stuff/terrain, so its not just on this house it's in a bp that has the rules for how they look/act and stuff, so manually adding it to hundreds of mesh would take forever.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question