Rick Posted October 12, 2010 Share Posted October 12, 2010 I have a model just like the lights. Inside the lua script I create a cube and make it's parent the model. I set the position of the cube to the position of the model but it's offset from it. Before when I was using LE function like EntityPosition() my model would be in the center of the cube, when when I switched to :SetPosition() it offset it. local object=self.super:CreateObject(model) object.cube = CreateCube() -- make the cube and make the object it's parent object.cube:SetPosition(object.model:GetPosition(1), 1) Quote Link to comment Share on other sites More sharing options...
Canardia Posted October 12, 2010 Share Posted October 12, 2010 You need to set the global parameter in EntityParent() to 1, else it will offset from the parent. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted October 12, 2010 Author Share Posted October 12, 2010 Ah, perfect thanks. I figured I forgot something simple. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.