Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SliceInstantiate in transforms can cause problems #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ErrantOverflow
Copy link

When you create the newObject, it copies the local position, rotation and scale of the original object, which is all fine, however, if the object itself is inside a transform with a position, rotation or scale that isn't the default one, it can cause some problems. It cam be fixed by simply assigning the same parent to the newObject.

You could argue that it wouldn't be necessary to do that if instead of using local position and rotation you used the global one, however, the scale is still a problem.

I was stuck trying to figure out why the sliced parts teleported through the map and it turned out to be this. I am sure this is a very hacky way of fixing this, but it worked for me, and hey, if it turns out to be a good solution, then perfect!

Leaving that aside, the slicing scripts work like a charm, thanks a lot for writing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant