Kronos 0 Posted September 13, 2012 Share Posted September 13, 2012 I don't know if such a thing is possible but it would be helpful for the model editor I'm working on. At the moment scale seems to be getting messed up when parenting entities. Quote Link to post Share on other sites
macklebee 885 Posted September 14, 2012 Share Posted September 14, 2012 Well it sounds more like an issue with how you are parenting than a problem with needing a global parameter for scaling. If you set the global parameter for EntityParent to a 0 (indicating local), then the child will scale to the parent's scale. If you set the parameter to a 1, then the child will maintain its scale regardless of the parent's scale. require("Scripts/constants/engine_const") RegisterAbstractPath("") Graphics(800,600) fw=CreateFramework() fw.main.camera:SetPosition(Vec3(.5,1,-4)) mesh1 = LoadModel("abstract::firepit.gmf") mesh1:SetScale(Vec3(.5,.5,.5)) mesh2 = CreateCube() mesh2:SetParent(mesh1, 0) mesh2:SetPosition(Vec3(-1,1,0),1) mesh3 = mesh1:Copy() mesh3:SetPosition(Vec3(1,0,0)) mesh4 = CreateCube() mesh4:SetParent(mesh3, 1) mesh4:SetPosition(Vec3(2,1,0),1) while KeyHit(KEY_ESCAPE)==0 do mesh1:Turn(Vec3(.5,0,0)) mesh3:Turn(Vec3(0,.5,0)) fw:Update() fw:Render() Flip(1) end Quote Link to post Share on other sites
Flexman 104 Posted September 26, 2012 Share Posted September 26, 2012 I would suggest avoid parenting unless you have to. I have 3 kids now and they are quite demanding. In the past I've seen issues relating to scale (and rotation) when parenting one model to the child object of another. I will instead parent the model to another model's root or pivot, then translate the attached model to its final position/rotation (fine if the position is static). 4 Quote Link to post Share on other sites
Paul Thomas 26 Posted September 26, 2012 Share Posted September 26, 2012 Lmao, Flexman. Quote Link to post Share on other sites
Kronos 0 Posted September 26, 2012 Author Share Posted September 26, 2012 Thanks for the input. I think I will take scaling out of the equation which will hopefully simplify things. Quote Link to post Share on other sites
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.