Linking object to another object in trueSpace
-
MikomDude
- Captain
- Posts: 1930
- Joined: 04 Oct 2010, 11:12
- Type the number ten into the box: 0
- Location: The Hague, Netherlands
Linking object to another object in trueSpace
I'm sure this is quite an easy one for all you trueSpace scripters out there but I'm not very knowledgable when it comes to trueSpaces non-modeling features so I was wondering two things:
1, how do I link an object to another objects transformation so it sticks and moves along with that object without rotation?
2, how do I link one object to adopt only the rotation of another object? but leaving its position unchanged?
If I could, I'd create some sort of object-linking tool where I could set an objects x,y,z position and x,y,z rotation all separately by simply selecting the object I want to link to from a drop-down list of all the objects in the scene.
Kind of like:
Rotation:
[x] = [object_02<]
[y] = [none]
[z] = [none]
Position:
[x] = [object_01<]
[y] = [object_01<]
[z] = [object_01<]
Perhaps something along these lines is already in the program. I just don't know about it.
1, how do I link an object to another objects transformation so it sticks and moves along with that object without rotation?
2, how do I link one object to adopt only the rotation of another object? but leaving its position unchanged?
If I could, I'd create some sort of object-linking tool where I could set an objects x,y,z position and x,y,z rotation all separately by simply selecting the object I want to link to from a drop-down list of all the objects in the scene.
Kind of like:
Rotation:
[x] = [object_02<]
[y] = [none]
[z] = [none]
Position:
[x] = [object_01<]
[y] = [object_01<]
[z] = [object_01<]
Perhaps something along these lines is already in the program. I just don't know about it.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Linking object to another object in trueSpace
-
MikomDude
- Captain
- Posts: 1930
- Joined: 04 Oct 2010, 11:12
- Type the number ten into the box: 0
- Location: The Hague, Netherlands
Re: Linking object to another object in trueSpace
Wow, from the pictures on your website that looks pretty much exactly like what I was looking for! I'll give it a try! Thanks!

-
MikomDude
- Captain
- Posts: 1930
- Joined: 04 Oct 2010, 11:12
- Type the number ten into the box: 0
- Location: The Hague, Netherlands
Re: Linking object to another object in trueSpace
Loving the script so far! Is it possible to add the script to a button? and maybe have piece of text in the properties of a constrained object that tells you which objects it is constained to?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Linking object to another object in trueSpace
I'm sure all sorts of improvements are possible, but it would be extremely low priority on my todo list. The last change was way back in 2008.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Linking object to another object in trueSpace
If Clinton does not mind, I'll try to incorporate them into the Unofficial Update!
Because those are some very awesome tools!
Because those are some very awesome tools!
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Linking object to another object in trueSpace
Don't be silly, of course I don't mind. 
-
MikomDude
- Captain
- Posts: 1930
- Joined: 04 Oct 2010, 11:12
- Type the number ten into the box: 0
- Location: The Hague, Netherlands
Re: Linking object to another object in trueSpace
Would be awesome to see this further developed, maybe with a point-object rotation in direction of linked object kind of function!
I was trying to use the script for animating this turret:

I was trying to use the script for animating this turret:

-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Linking object to another object in trueSpace
Maybe this thread will help. Lots of Link Editor help with objects.
viewtopic.php?t=425&p=3234#p3231
viewtopic.php?t=425&p=3234#p3231
-
MikomDude
- Captain
- Posts: 1930
- Joined: 04 Oct 2010, 11:12
- Type the number ten into the box: 0
- Location: The Hague, Netherlands
Re: Linking object to another object in trueSpace
Oh yeah! I remember that! Although I can't find any links in this thread with how he actually got all that to work. He said it was simple... everything is simple once you know and understand it. haha
I miss Prodigy.
I miss Prodigy.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Linking object to another object in trueSpace
Here is what I have come up with so far.clintonman wrote: 20 Sep 2019, 19:43 Don't be silly, of course I don't mind.![]()
No code changes. Added:
Short names to the UI.
Floating panel
Dabbled at removing the pWeight con(s) with the UnDoIt with no luck.
Seems that the pWeight(s) can be created endlessly.
- Attachments
-
- Constraint.RsObj
- (90.2 KiB) Downloaded 216 times
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Linking object to another object in trueSpace
Don't forget, one object can have several constraints assigned to it, so it can have more than one weight.
You can click the pictures in the web page to see videos of the tools in use:
http://clintons3d.com/truespace/truespa ... raints.htm
You can click the pictures in the web page to see videos of the tools in use:
http://clintons3d.com/truespace/truespa ... raints.htm
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Linking object to another object in trueSpace
I have it on my Desktop.
You do not mention anything about the preStore and buttons.
I assume the video was created before the above addition.
You do not mention anything about the preStore and buttons.
I assume the video was created before the above addition.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Linking object to another object in trueSpace
This could be a very valuable tool for trueSpace!
Maybe I am not using it correctly.
Currently there is several errors with your current unmodified scripts.
The theNode script called from the Sendit object seems be missing:
Code: Select all
Activity.Run(Space.CurrentScene() + theNode);Cleanup (unDoIt) does not work and there is errors
Constraints Wish List
Auto Popup Floating panel
User Interface
Buttons to select the Controller and Controlled objects and works with Add and Remove.
Constraint panel has the UI exported to the Controlled parent
Controller (constrainor) and Controlled (constrainee) attributes exported to the Constraint panel
pWeights exported to the Constraint panel (Not to the parent panel),
with the chected flags IE: XR, YR, ZR
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Linking object to another object in trueSpace
General Constraint script with some fixes.
changes from the 2008 version on my website are
fix - extra matrix connection was being made for each controlling object
removed the exports for the weight connectors and instead exported the entire constraint node. this makes all the values visible in the side panel and connectors don't need to be removed when the constraints are removed
fix - zero value for weight now has no influence when only one controller is applied
Still has the same limitation as the original. It uses command scripts which are not compatible with rendered animations without first baking the animation down to keyframes. I plan to make a version that does work with animation by using object scripts instead. Object scripts are more limiting in that the controllers and the controlled will have to be at scene level, not in a group and the number of possible controllers will have to be a hard coded value instead of unlimited.
changes from the 2008 version on my website are
fix - extra matrix connection was being made for each controlling object
removed the exports for the weight connectors and instead exported the entire constraint node. this makes all the values visible in the side panel and connectors don't need to be removed when the constraints are removed
fix - zero value for weight now has no influence when only one controller is applied
Still has the same limitation as the original. It uses command scripts which are not compatible with rendered animations without first baking the animation down to keyframes. I plan to make a version that does work with animation by using object scripts instead. Object scripts are more limiting in that the controllers and the controlled will have to be at scene level, not in a group and the number of possible controllers will have to be a hard coded value instead of unlimited.
- Attachments
-
- Constraint script 2020_11.RsObj
- (83.98 KiB) Downloaded 219 times
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Linking object to another object in trueSpace
Yay! Thanks!clintonman wrote: 07 Jan 2020, 06:36 General Constraint script with some fixes.
changes from the 2008 version on my website are
fix - extra matrix connection was being made for each controlling object
removed the exports for the weight connectors and instead exported the entire constraint node. this makes all the values visible in the side panel and connectors don't need to be removed when the constraints are removed
fix - zero value for weight now has no influence when only one controller is applied
Still has the same limitation as the original. It uses command scripts which are not compatible with rendered animations without first baking the animation down to keyframes. I plan to make a version that does work with animation by using object scripts instead. Object scripts are more limiting in that the controllers and the controlled will have to be at scene level, not in a group and the number of possible controllers will have to be a hard coded value instead of unlimited.
One thing that I noticed when using this, the Constraint inside your General Constraint script can be deleted and then causes an error.
unDoIt
Add
Code: Select all
var constraint = System.ThisOwner() + "/Constraint"
if(Node.FirstSelected() == constraint)
return;
var Constraint = System.ThisOwner()
if(Node.FirstSelected() == Constraint)
return;-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Linking object to another object in trueSpace
This version will render without the need to bake keyframes of the constrained object. It only works with scene level items. It does not work inside a group.
- Attachments
-
- Constraint Passive106.RsObj
- (52.2 KiB) Downloaded 216 times

