Notifications
Clear all

[Closed] how to get position x value on a specific frame?

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

4 Replies

Hi, this is quite simple:


varX = 0

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

print varX

What exactly do you need to do ?

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

1 Reply
(@polimeno)
Joined: 10 months ago

Posts: 0

Try this:


varX = 0

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

print varX

the answer was so simle

thx!!