Smooth moving gate (Object)
#1

Hi guys.
I made a moving gate (object) using Incognito's streamer.
My problem is making the movement smooth in stead of this:



I know that there is a MoveDynamicbject function, but it also has to rotate.
I have seen gates in other servers with smooth movements, so i know its possible.

Hope you can help. Thanks.
Reply
#2

Why does it have to rotate as well?
Reply
#3

Quote:
Originally Posted by Famalamalam
Посмотреть сообщение
Why does it have to rotate as well?
Because it has to rise up, like in real life. You know, object rotation
Reply
#4

It doesnt work when i use MoveDynamicObject
Reply
#5

You should make your point more clear...

Quote:

I know that there is a MoveDynamicbject function, but it also has to rotate.

ALSO has to rotate.

Are you creating the object with CreateDynamicObject? Are you using IsValidDynamicObject to check?
Reply
#6

Yes, i used CreateDynamicObject to create the object. If you look at the animaated image, it shows how it looks right now when the gate opens. I want to make it more realistic, like open slowly and smooth in stead of jumping from one point to another. The MoveDynamicObject wont do the trick, because the object also has to rotate in order to be in open position.
Reply
#7

You have to use TWO functions at the SAME TIME:

pawn Код:
1. MoveDynamicObject() //Normally
2. SetDynamicObjectRot() //Using a repeating timer...
Key1: Object is closed
Key2: Object is opened.

So, to do the animation correctly:
-> Move the object Higher and closer to the Joint.
-> Using a timer rotate the object at a total of 90 degrees in X/Y axis (depending on your world postion).

Let me show you a picture:
Reply
#8

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
You have to use TWO functions at the SAME TIME:

pawn Код:
1. MoveDynamicObject() //Normally
2. SetDynamicObjectRot() //Using a repeating timer...
Key1: Object is closed
Key2: Object is opened.

So, to do the animation correctly:
-> Move the object Higher and closer to the Joint.
-> Using a timer rotate the object at a total of 90 degrees in X/Y axis (depending on your world postion).

Let me show you a picture:
Wow. Thank you very much.
I also thought about using a timer, but i was wondering wheter there was an easier way or not.
Now i know that there is not
But where exactely should I use the timer?

Thank you very much!
Reply
#9

Use the timer to increase the angle value to maximum of 90.

Example (in words): Set Repeating Timer on Objectid's Y Angle +10.

When it reaches/over 90. Kill the timer.

So it should animate like it's Swinging, I hope you understand.

BTW, I'm creating an Object Mover Tool Now, will release it soon.
Reply
#10

Maybe you can use an include... Object Rotation include (like this one)
I use the same in my Filterscript ^^
Reply
#11

Thanks everyone. I have it now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)