Kelly003 0 Posted February 11 Share Posted February 11 (edited) I have a problem with how to loop and setElementRotation to keep the object rotating. I would like to ask you to send me a ready code how to do it because I am a beginner code: local obj=createObject(1947,191.14917, -107.59645, 1.54682-1) Edited February 11 by Kelly003 Link to post
Tekken 146 Posted February 11 Share Posted February 11 Rotating x, y or z? You may just need to do like onClientRender roatet object y+1 or something like that. Link to post
Hydra 36 Posted February 11 Share Posted February 11 local obj=createObject(1947,191.14917, -107.59645, 1.54682-1) function d() local orx, ory, orz = getElementRotation(obj) setElementRotation(obj, orx+1, ory, orz) end end addEventHandler("onClientRender", getRootElement(), d) Or use: interpolateBetween() if you want a smooth rotation 1 Link to post
Scripting Moderators thisdp 244 Posted February 14 Scripting Moderators Share Posted February 14 (edited) local obj=createObject(1947,191.14917, -107.59645, 1.54682-1) function d() setElementRotation(obj, 0, 0, (getTickCount()/10)%360) end addEventHandler("onClientRender", getRootElement(), d) For fps ineffective rotation Edited February 14 by thisdp Link to post
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