View unanswered posts | View active topics It is currently Mon Feb 19, 2018 4:59 pm

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Vectors
Author Message

Joined: Mon Dec 21, 2015 9:30 am
Posts: 75
Vectors
Any full documentation out there on how vectors and velocities work in lua?

I know about nothing except that the variables Pos and Velocity are a thing. That exist. And have values.

I've gone about a bit and while every code seems to use some form of advanced vector/velocity trickery nowhere is it actually, step-by-step explained. If any of you can prove me wrong on that, that'd be awesome.

Fri Aug 04, 2017 12:17 am

Joined: Fri Sep 10, 2010 1:48 am
Posts: 640
Location: Halifax, Canada
Re: Vectors
What're you trying to understand? They're pretty standard 2d vectors - they have two number values, the first being X value which describes their horizontal component, and the second being their Y value which describes their vertical component. For position vectors, (0, 0) is at the top left of the screen if I'm not mistaken, and x increases as things go right while y increases as things go down. For things like velocities, the size of the numbers describes the speed of the velocity vector in each of the aforementioned directions, so a positive x would mean it's describing something moving right at some speed. Keep in mind that both of these things are the same vectors, what matters is how you interpret their values.

If it'll help you any, there's a wiki page for it which probably tells you most everything you can do with them:
http://wiki.datarealms.com/LuaDocs/Vector

If you're still confused, I'd recommend googling for Vector tutorials, even if the specifics differ, they'll be much the same as CC vectors. For example, here's a unity one that's probably straightforward:
https://unity3d.com/learn/tutorials/top ... ctor-maths

Thu Aug 10, 2017 4:39 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 2 posts ]

#### Who is online

Users browsing this forum: No registered users

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Cortex Command    Dev Log    Wiki    Game Discussion    Game and Licensing Support    Mod Making       Lua Scripting       Requests    Mod Releases       Older Mods    Scene Releases       Scene Making Planetoid Pioneers    Game Discussion    Pioneer Program Lounge Data Realms Off-Topic    Off Topic Chat       Gaming       Forum Games    Site Support & Feedback
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.016s | 15 Queries | GZIP : Off ]