skip to content
Orx Learning
User Tools
Admin
Log In
Site Tools
Search
Tools
Show page
Old revisions
Export to PDF
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
Welcome
Beginner's Guide
Config
Examples
Tutorials
en:examples:maths:initialising_an_orxvector
====== Initialising an empty orxVECTOR ====== Some ways to initialise an empty orxVECTOR. orxVECTOR position = {}; orxVECTOR position = {0, 0, 0}; orxVECTOR position = orxVECTOR_0; orxVECTOR position; position.fX = 0; position.fY = 0; position.fZ = 0; orxVECTOR position; orxVector_Set(&position, orx2F(0.0f), orx2F(0), orxFLOAT_0); Uninitialised orxVECTORs can create unintended consequences in your game. You can also do: orxVECTOR tilePos; orxVector_Set(&tilePos, orx2F(80.0f) * x, orx2F(160.0f), orxFLOAT_0); orxObject_SetPosition(tile, &tilePos); orxVECTOR pos; orxObject_GetPosition(player, &pos); pos.fX = -pos.fX; orxObject_SetPosition(player, &pos);
en/examples/maths/initialising_an_orxvector.txt
ยท Last modified: 2025/09/30 17:26 (14 months ago) by
127.0.0.1
Page Tools
Show page
Old revisions
Backlinks
Export to PDF
Rename Page
Back to top