bansama Posted February 11, 2014 Share Posted February 11, 2014 I'm looking at the Entity::SetPosition documentation and it mentions the following: "Local coordinates are relative to the entity parent's space". But it doesn't mention how you define this. Is this defined with SetParent? I realise this is probably stupidly obvious, but the clarification would be appreciated! What I am hoping to do is get an entity's local position relative to the object it is colliding with. Could someone also explain matrix in the context of GetMatrix/SetMatrix? What would it be used for? Does it significantly differ to position and rotation or does it contain the same type of information? Thanks! Quote Link to comment Share on other sites More sharing options...
shadmar Posted February 11, 2014 Share Posted February 11, 2014 entity1:SetMatrix(entity2:GetMatrix()) --will set entity2's position, rotation and scale to entity1. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Guppy Posted February 11, 2014 Share Posted February 11, 2014 @shadmar - surely you have that backwards? Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 11, 2014 Share Posted February 11, 2014 I think Shadmar is correct although the wording might be confusing. Entity1 gets all the information about position, rotation and scale from entity2. Quote Link to comment Share on other sites More sharing options...
bansama Posted February 11, 2014 Author Share Posted February 11, 2014 While interesting, that still leaves me wondering why/how setting a matrix would be used. 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.