=FAS=Shigawire Posted September 21, 2008 Share Posted September 21, 2008 Hey, im working an a new design for the prox mine. nearly finished, but its wrong rotated. So I used setObjectRotation, but now the mine is as flat as a piece of paper... also if i put the rotation directly into the createObject function: function laymine(player) local posx, posy, posz = getElementPosition ( player ) local landmine = createObject ( 1510, posx, posy, posz --[[ .999--]]) setObjectRotation ( landmine, 90, 0, 3.18 ) local landminecol = createColSphere ( posx, posy, posz, 3 ) setElementData ( landminecol, "type", "alandmine" ) setElementData ( landminecol, "owner", player ) setElementData ( landmine, "type", "proximity" ) setElementParent ( landmine, landminecol ) end What could that be? Link to comment
Gamesnert Posted September 21, 2008 Share Posted September 21, 2008 You might want to increase Z a little I guess. Sometimes if objects rotate they sink into the surface a little. Also, why rotating it after creating? You can also set rotation in createObject. Link to comment
=FAS=Shigawire Posted September 21, 2008 Author Share Posted September 21, 2008 also if i put the rotation directly into the createObject function: The object is hanging in the air so this can ot be the problem I made a screenshot: http://www.fileshack.us/get_file.php?id ... en0010.png EDIT: uhm wrong pic, : http://www.fileshack.us/get_file.php?id ... en0011.png Link to comment
Gamesnert Posted September 21, 2008 Share Posted September 21, 2008 Hmmm didn't read that... Anyway, is your model also flat without rotating? And if it's a custom one, does importing it pre-rotated work? Link to comment
=FAS=Shigawire Posted September 21, 2008 Author Share Posted September 21, 2008 its not flat without rotating . does importing it pre-rotated work What do you mean by that? and its the original one that also gives that bug.. whatever it is Link to comment
Gamesnert Posted September 22, 2008 Share Posted September 22, 2008 its not flat without rotating . does importing it pre-rotated work What do you mean by that? and its the original one that also gives that bug.. whatever it is That you rotate the object in the file. Because I guess this is a custom object? So just change the rotation of the object in the txd and dff if possible. Link to comment
=FAS=Shigawire Posted September 22, 2008 Author Share Posted September 22, 2008 So just change the rotation of the object in the txd and dff if possible. I tried that, but it is still wrong But maybe i did it wrong inside Autodesks 3D Studio Max... Link to comment
50p Posted September 22, 2008 Share Posted September 22, 2008 So just change the rotation of the object in the txd and dff if possible. I tried that, but it is still wrong But maybe i did it wrong inside Autodesks 3D Studio Max... If you're using 3ds max, you can't just rotate the object. Remember, when you export an object it has to be placed at 0,0,0 and rotated 0,0,0. So how to make an object rotated? Here is the solution: 1. Select the object 2. Click on Hierarchy tab on the right (where you have Create, Modify, etc.) 3. You should have 3 buttons there (Affect Pivot Only, Affect Object Only and Affect Hierarchy Only), click on Affect Pivot Only 4. Now you should see the arrows (X, Y and Z directions) got greater, you can now rotate/move these arrows around the scene and that will be centre of the object. If you move this to the centre of the object and you place the object in-game (without changing coords) you will see the object has changed its position but you never changed it, that's because object is moved to the place of Pivot location. 5. When you are done with rotating/moving these arrows, click Affect Pivot Only again 6. Now you have to prepare the object for exporting, so select Move Tool, press F12 and set X, Y and Z to 0 (in Absolute:World). Do the same for Rotation, now your object should look like object created in game without rotations. Link to comment
=FAS=Shigawire Posted September 22, 2008 Author Share Posted September 22, 2008 Thanks, will try that, when i finished the anti-cheat script ^^ 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