-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature request: more options for Parenting strategy #2
Comments
This kind of thing is what transitioners are for. In the parenting attach strategy, add a flexible transitioner for the child (this says what the child will do when it joins the attachment). Then you want to set the Position Behavior to Snap, which means the child's position will move so that an anchor on the child is on top of an anchor on the parent. It should look something like this (most of this is just the default values): Then if you want to adjust the anchor positions, you need to define the "params" which are just Vector3 variables that say what xyz offsets the two anchors are at. When attaching, the transitioner will look for a Vector3 param called "position" on the parent, and another Vector3 param called "position" on the child (you could change the names to "offset" or something too). You have a few options for where to put the params:
This is really complicated to describe but it's actually pretty easy to do. :) Hopefully it makes sense. You can do the same thing for the rotation, just set the rotation behavior in the transitioner to Snap and then declare a param somewhere to say what the angles should be. You could also write your own transitioner to simplify this a lot, the flexible one is just there to cover a lot of common cases. |
It would be really useful if Parenting strategy feature allow for target position and rotation offsets.
The text was updated successfully, but these errors were encountered: