ArBuZ Posted June 23, 2011 Share Posted June 23, 2011 I'm making parenting, but without EntityParent command. Also I interested in position only. Rotation of parent doesn't change. So question is what command would be faster in such situation. SetEntityPosition(child, GetEntityPosition(parent)); or SetEntityMatrix(child, GetEntityMatrix(parent)); Quote Q6600@2.4GHz - 9600GT - 4GB DDR2@800MHz - Windows7 x64 3ds max / photoshop CS3 / C++ http://www.arbuznikov.com Link to comment Share on other sites More sharing options...
Canardia Posted June 23, 2011 Share Posted June 23, 2011 I made a list how fast each LE2 command is, and EntityMatrix was faster than PositionEntity and RotateEntity each alone, so it's a lot faster than doing both PositionEntity and RotateEntity. 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...
ArBuZ Posted June 23, 2011 Author Share Posted June 23, 2011 Thank you very much Lumooja! You helped me again 2 times in less than a 20 minutes. Thanks! Quote Q6600@2.4GHz - 9600GT - 4GB DDR2@800MHz - Windows7 x64 3ds max / photoshop CS3 / C++ http://www.arbuznikov.com Link to comment Share on other sites More sharing options...
Canardia Posted June 23, 2011 Share Posted June 23, 2011 Small correction: PositionEntity is faster than EntityMatrix, so only if you use both Position+Rotation, or Rotation only, then EntityMatrix is faster: http://www.leadwerks.com/werkspace/topic/2411-entity-commands-speed-test/page__p__22232__hl__entitymatrix__fromsearch__1#entry22232 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...
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.