Sasu Posted April 13, 2013 Posted April 13, 2013 Hi guys! Can you help me with my script? local barrera2 = createObject(968, 1288.59998, -2049.1001, 59, 0, 270, 90) function cerrar2() moveObject( barrera2, 1000, 1288.59998, -2049.1001, 59, 0, 270, 90) end addEventHandler("onMarkerLeave", marker1, cerrar2) function abrir2() moveObject( barrera2, 1000, 1288.59998, -2049.1001, 59, 0, 0, 90) end addEventHandler("onMarkerHit", marker1, abrir2) Well, my problem is when a hit the marker the object dont rotate as I want. It rotates to either side. Why? State: Inactive
Puma Posted April 13, 2013 Posted April 13, 2013 The rotation you put into moveObject is ADDED to the current rotation. So, in abrir2 it should be 0, -270, 0 And in cerrar2 it should be 0, 270, 0 If I understand your script correctly. "The total IQ of the world is a constant. The more people, the more idiots." - Anonymous.
Sasu Posted April 13, 2013 Author Posted April 13, 2013 It's works correctly now. Thank you very much. State: Inactive
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now