Give Page Feedback | API

Secondary Components - Move Transform On World Shift

A simple component that can be used to configure a Transform so that it is shifted at the same time as a World using a World Shifter component. This is useful for shifting things that are not part of any World Groupings belonging to your World, but that need to be moved whenever the World is moved in order to function correctly. However, note that it should not be used to shift your Player object (there are better options available).

Note that the Move Transforms On World Shift component (which was added with update 1.4.0) is typically a better choice when attempting to move Transforms, as it can accomadate multiple Transforms and offers options to add and remove Transforms at runtime via scripting.

Creating A Move Transform On World Shift Component

You can add this component by selecting a game object and then selecting from the Top Menu Bar:

Component -> Deep Space Labs -> -> SAM -> Secondary Components -> Move Transform On World Shift

Adding A Move Transform On World Shift Component From The Top Menu Bar GIF

or by selecting a game object and using the Add Component menu via its inspector:

Component -> Deep Space Labs -> -> SAM -> Secondary Components -> Move Transform On World Shift

Adding A Move Transform On World Shift Component From Add Component Menu GIF

Clarifications

The labels for each setting already give a clear overview of what each setting does, so we will not be repeating that information. Instead, we will be clarifying a few things that may be obscure.

1) In general, a single World Shifter instance may be used with multiple Worlds. In this case, and only in this case, it may be necessary to filter Worlds so that the Transform is only shifted with a sub-selection of all Worlds using the World Shifter. You can use the World IDs To Filter. for this purpose. When IDs are assigned to this field, the Transform will only be shifted when the World Shifter shifts a World with one of the IDs.

2) Transforms shifted using this component are always shifted either fully before the World or fully after the World. Whether it is before or after depends on the Move Before World Shift setting.

3) This component makes use of some publicly available events located on the World Shifter class in order to be notified of when a World Shift is happening. As such, it is merely a convenience script and you can bypass its use in favor of creating a custom script that subscribes to these methods yourself.