1. Why do arrays in lua start with 1 instead of 0?
2. Why can I not easily multiply 2 vectors? Ex.) local vec = Vector(5,5,5) * Vector(0.1,0.8,1) this will just be 0,0,0
1. That's just how Lua is. I don't think there's any compelling reason why.
2. Because we have [b][url=wiki.garrysmod.com/?title=Vector.DotProduct]Vector.DotProduct [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] and garry is too lazy to make an * operator for two vectors.
Oh I didn't know thats what that function did; wish I knew about that before I was doing it a really long way. Thanks.
Sorry, you need to Log In to post a reply to this thread.