GTX Posted June 18, 2012 Posted June 18, 2012 How to set a rotation of marker? Tried with setElementRotation but it doesn't work.
Castillo Posted June 18, 2012 Posted June 18, 2012 If it's not working with that function, then I doubt it is possible.
denny199 Posted June 18, 2012 Posted June 18, 2012 I looked @ editor resource for you and i found this: you should look in editor_main>client>main This isn't complete I know I had no time because I need to go function updateArrowMarker( element ) if not g_arrowMarker then return end local element = element or g_selectedElement if not element then return end local radius = edf.edfGetElementRadius(element) or 1 local offsetZ = radius + 1 local markerSize = math.max(g_arrowMarkerMinSize,g_arrowMarkerSizeRatio*radius) if isElementAttached(g_arrowMarker) then detachElements(g_arrowMarker, getElementAttachedTo(g_arrowMarker)) end setMarkerSize(g_arrowMarker, markerSize) attachElements(g_arrowMarker, element, 0, 0, offsetZ) showGridlines ( element ) end function createArrowMarker( handle ) if not handle or not isElement(handle) then return end if g_arrowMarker then destroyElement(g_arrowMarker) end g_arrowMarker = createMarker(0, 0, 0, "arrow", .5, 255, 255, 0, 255) setElementDimension(g_arrowMarker, getWorkingDimension()) updateArrowMarker( handle ) end you should look in editor_main>client>main
GTX Posted June 18, 2012 Author Posted June 18, 2012 @denny199 I want to set a rotation of a cylinder. Tried that code and it really doesn't set rotation of a cylinder. Weird... I tried setElementPosition and it works... but setElementRotation doesn't...
BinSlayer1 Posted June 19, 2012 Posted June 19, 2012 Cylinders can only be placed in a "standing" positon, thus there is no way to rotate it on X and Y axis. And rotating it on Z makes no sense because of its circular shape.
Rick_Grimes Posted July 25, 2022 Posted July 25, 2022 try this: local x,y,z = 0,0,0 local radius = 2 local rx,ry,rz = 0,90,90 local markerRL2 = createObject(1316,x,y,z) setObjectScale(markerRL2,radius) setElementRotation(markerRL2,rx,ry,rz) createColSphere(x,y,z,radius+0.2) this will make a marker like "ring":
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