Jump to content

Load Prefab Position


tjheldna
 Share

Recommended Posts

This is an optimisation to opening prefabs as I see it, you may not agree with me so do with this as you want. I'm just starting to get more picky now, as It's getting increasingly harder to find bugs =).

 

When you open up a prefab using File->Load, the prefab in the world is where ever it was when you created it. i.e

  • I save the model in the original scene at x = 30.0, y = 1.0, z = 23.0

  • If you open up the prefab file you created, the models will be positioned at that location above.

  • I guess I would expect it all centered when I go to edit it at 0.0, 0.0, 0.0.

 

Cheers!

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Link to comment
Share on other sites

  • 1 year later...

Sometimes it can be useful to have the original position but in most cases it isn't it. An extra parameter for the Load command would suffice:

Load("path", bool useOriginPosition)

 

 

I got that case , and i would need the prefab to instanciate at original world offset position instead of having the prefab centered at position 0,0,0 as it is today. The main use is for using different 3D tiles and their management by code.

Stop toying and make games

Link to comment
Share on other sites

I was talking about the offset we could need to keep.

 

If i have in Blender a sphere model positionned at 10,10,10

I would want after importing it in LE3 ,if i place the model in the scene at 0,0,0 , to have the sphere still at 10,10,10

 

LE3 when importing a model recalculates the global center unfortunatelly.Having some option not not recalculate the object center could be usefull some times.

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...