Notifications
Clear all

[Closed] How to get local position of spring controller?

Hi there,

I am trying to access the local position of a spring controller including the offsets that are produced by the spring.

So when I create two point helpers and assign a spring controller to one point helper and link that point helper to the other one, I use:

$.controller[1].controller[1].value

That gives me the pivot position of the spring controller, but it does not give me the correct values when the spring is active, means when I animate the root point helper and the spring controller point helper moves away. So it does not include the animated offsets.

I have also tried this:

in coordsys local $.controller.position

or

in coordsys parent $.controller.position

Why does this return the world position and not the local position when used with a spring controller?

How can I access the correct secondary animated local position values of a spring controller?

Thanks for any help!

8 Replies

Have you tried using the Expose helper to see if it obtains the values you need ?

Damn that is a good idea. I will check that immediately…

Working perfectly! I should really have got that idea on myself cause I am using ExposeTm a lot. Sometimes you are just blocked… Thank you very much.

Great!

Expose is a great time saver… I don’t know how advanced is what you’re doing, but lately it has been of great help to me… I don’t know since which version it came out, I sometimes rememeber having headaches to do little stupid things that can be done immediately by expose…

Well, GL!

I was trying to control the weighting of the spring controller for each axis locally in order to have a spring only in specific local axis. Stupidly, the X, Y and Z effects of the spring controller does not work locally, they always seem to be in world. So I needed a way to capture the local animated offsets of the spring controller and the ExposeTm does a good job here! Yes ExposeTm helps a lot!

I’m using this for a muscle system (with CATMuscle, really awesome tool that ships with CAT3). The result is amazing and can be exported into any game engine.

The other solution is just link and align your spring controller object to one helper with the same starting position of your spring, serving as a default local position. So when your spring controller have a weighting of zero it would stay still at the default starting position.

1 Reply
(@graeck)
Joined: 11 months ago

Posts: 0

I already did that but it did not help to solve the problem.

That’s a smart solution, eek. This way I even don’t need another extra point helper like ExposeTm.

 eek

Just capture its transform space relative to a target:

($spring.transform * inverse $base.transform).pos[1]

pos[1] being x value