Sasu Posted April 13, 2013 Share 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? Link to comment
Puma Posted April 13, 2013 Share 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. Link to comment
Sasu Posted April 13, 2013 Author Share Posted April 13, 2013 It's works correctly now. Thank you very much. Link to comment
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