AggrorJorn Posted March 22, 2010 Share Posted March 22, 2010 So I'm just messing around outside the editor. I've taken a look at the example.lua file and I am noticing a different way of scaling and positioning entities. instead of SetScale(Vec3()), the command SetScalef() is used. I can't find anything about it in the wiki. Whats is so different about it? --edit Just noticed that the size is different. F probably stands for foot? Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 22, 2010 Share Posted March 22, 2010 All commands with an f at the end means that they don't take a Vec3 as parameter, but 3 seperate float values. mesh::SetScale(Vec3(1,2,3)) mesh::SetScalef(1,2,3) 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 March 22, 2010 Share Posted March 22, 2010 f stands for float. It's the same thing, just a different way in passing the parameters. He should have just used the same name. Lua doesn't care if you use the same name with different parameters. It can figure it out. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted March 22, 2010 Author Share Posted March 22, 2010 ah okay, I'll stick with vec3. it just sounds better. Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 22, 2010 Share Posted March 22, 2010 Yeah, it's also less typing when you use vec3, since then you can put it in a variable: mesh::SetScale(a) 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...
AggrorJorn Posted March 22, 2010 Author Share Posted March 22, 2010 good point Quote Link to comment Share on other sites More sharing options...
Josh Posted March 22, 2010 Share Posted March 22, 2010 f stands for float. It's the same thing, just a different way in passing the parameters. He should have just used the same name. Lua doesn't care if you use the same name with different parameters. It can figure it out. You have to write the interpretation of the parameters yourself in the Lua interface code. Lua doesn't just choose a function based on the number of parameters, unfortunately. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted March 22, 2010 Share Posted March 22, 2010 oh, I thought it did this automatically. My bad. 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.