PDA

View Full Version : how to get position x value on a specific frame?


hokr
04-19-2011, 04:34 PM
i've got a box moving form left side to right in x direction. How can I assign to a variable its x value on a specific frame. e.g. b = box x value on frame 20 or on currentFrame - 5


thanks for any help

Polimeno
04-19-2011, 06:16 PM
Hi, this is quite simple:


varX = 0

at time currentTime
(
varX = <obj>.pos.x
)

print varX


What exactly do you need to do ?

hokr
04-19-2011, 06:27 PM
yeah, I just figured it out, I can use currenttime, slidertime or at time and a frame number :)

but how can I get e.g. currenttime - 2frames? currenttime - 2 doesn't seem to work

Polimeno
04-19-2011, 06:37 PM
but how can I get e.g. currenttime - 2frames? currenttime - 2 doesn't seem to work


Try this:


varX = 0

at time (currentTime - 2)
(
varX = <obj>.pos.x
)

print varX

hokr
04-19-2011, 06:42 PM
the answer was so simle

thx!!

CGTalk Moderation
04-19-2011, 06:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.