https://github.com/justsleightly/transformconverter
https://github.com/justsleightly/transformconverter
unity vrchat vrchat-tool
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/justsleightly/transformconverter
- Owner: JustSleightly
- Created: 2023-01-09T08:23:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-09T21:50:36.000Z (almost 3 years ago)
- Last Synced: 2025-02-26T15:27:14.194Z (over 1 year ago)
- Topics: unity, vrchat, vrchat-tool
- Language: C#
- Homepage: https://notes.sleightly.dev/misc-scripts
- Size: 438 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TransformConverter [
](https://vrc.sleightly.dev/ "JustSleightly") [
](https://discord.sleightly.dev/ "Discord") [
](https://github.sleightly.dev/ "Github") [
](https://store.sleightly.dev/ "Store")
[](https://github.com/JustSleightly/TransformConverter/stargazers) [](https://github.com/JustSleightly/TransformConverter/tags) [](https://github.com/JustSleightly/TransformConverter/releases) [](https://github.com/JustSleightly/TransformConverter/issues) [](https://github.com/JustSleightly/TransformConverter/commits/main) [](https://discord.sleightly.dev/)
A Unity editor extension that replaces all transform animation properties within selected animation clips with position/rotation/parent/~~scale~~ constraint offset properties. This is primarily developed to assist with avoiding transform animations on [VRChat Avatars due to complex issues with Avatar Masks on Animator Controllers](https://docs.vrchat.com/docs/playable-layers#fx).
While transform animations can mostly be emulated with constraint offset animations, this script only handles replacing the properties of animation clips and does not create the constraint components on your animated gameobjects in your hierarchy.
**Scale Transform Animations do not convert nicely so they have been removed from functionality until a better solution is implemented.**
---
### **[Download Here!](https://github.com/JustSleightly/TransformConverter/releases)**
---

## Constraint Setup
For any gameobject that you would normally animate transforms for, add a constraint component instead for the respective transform you are trying to emulate. If you are animating both position and rotation, you can opt to use a parent constraint instead and toggle the option for `Using Parent Constraints` in the TransformConverter editor window.
For each constraint, you will typically set the constraint settings so that the `At Rest` and `Offset` values match your default transform values for that transform property.
For each constraint source, you will typically set the immediate parent gameobject from the hierarchy as the only source. ~~with the exception of _**Scale Constraints**_ which should use a _WorldTransform_ prefab of _(1,1,1)_ scale instead. This prefab should not exist in your hierarchy/scene and only exist in your project assets instead so as to maintain absolute values. Note that the actual transform value of your scale may deviate from your animated offset when not a power of 2.~~
An example prefab can be found in the [examples](https://github.com/JustSleightly/TransformConverter/tree/main/Examples) folder.
Position Constraint Example

Rotation Constraint Example

Parent Constraint Example

Scale Constraint Example
