Jump to content

Archived

This topic is now archived and is closed to further replies.

robocopatrik

Global Position Velocity of an Object

Recommended Posts

Hi,

 

I was wondering how to get the global position velocity of an object via xpresso. I know there is a position velocity output on every object node but that output refers to the local position matrix, not the global one.

I have my object in a null object whose position is animated. As a child of the null, the object moves with the parent but the local position remains zero, thus also it's local position velocity.

But I can output the global position matrix of the object via it's xpresso node... only I don't know how to get to the global position velocity from there.

 

Thanks in advance!

 

 

 

Share this post


Link to post

Hard to know exactly without a scene file, but two suggestions are to get Position Velocity from the Null or unparent the Object from the Null and instead use a Constraint tag on the Object to get the PSR from the Null so that the Position Velocity is then calculated as Local.

Share this post


Link to post

What about calculating it using a memory node set to 1F to get previous global position -

 

global velocity = (global pos - prev global pos) * fps

 

velocity.c4d

 

might work . . .

Share this post


Link to post
On 12/19/2017 at 1:04 AM, jed said:

What about calculating it using a memory node set to 1F to get previous global position -

 

global velocity = (global pos - prev global pos) * fps

 

velocity.c4d

 

might work . . .

YEEEES, thank you so much, jed! Works like a charm! This is exactly what I needed. 

Share this post


Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...