.:HyPeX:. Posted February 10, 2015 Share Posted February 10, 2015 Hello, so far i tried some nasty things but with no succeed... My first guess was something like this: local _,_,rot = getElementRotation(veh2) local size = getElementRadius ( veh2 ) local x,y,z = getElementPosition(veh2) local nx,ny = getPointFromDistanceRotation(x,y,size*0.7,rot) local cx,cy,cz = getPositionFromElementOffset(veh2, nx,ny,z+size) This wasnt even close to work at all actually... My second guess i thought it was closer (But actually just trying to get something to work at all), but it is somehow not working... local x,y,z = getElementPosition(veh1) dxDrawRectangle3D( x, y,z+10,10, 10,tocolor(255,255,255,255)) Any help regarding to this would be appreciated. My idea was to make the box appear just on top of the car as a podium, wich i couldnt achieve at all right now... Visual failure: Link to comment
Dealman Posted February 10, 2015 Share Posted February 10, 2015 Try to use getPositionFromElementOffset which can be found in getElementMatrix. These use vector space coordinates, so 0, 0, 0 would be the center of the car. And then use that in cojunction with getScreenFromWorldPosition. Link to comment
.:HyPeX:. Posted February 11, 2015 Author Share Posted February 11, 2015 Try to use getPositionFromElementOffset which can be found in getElementMatrix. These use vector space coordinates, so 0, 0, 0 would be the center of the car.And then use that in cojunction with getScreenFromWorldPosition. Seems good! thanks. 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