Jump to content

Sign in to follow this  
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
Share on other sites

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
Share on other sites

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
Share on other sites
  • Topic Author
  • 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
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...