S3D_TRANSLATE(3)
π S3D_TRANSLATE(3) π
okay bestie, welcome to the s3d manual, section 3, and today's main character is s3d_translate β no cap, she's the one who moves your object to an absolute position. let's get into it π¦
β¨ NAME β¨
s3d_translate β move object to absolute position
like literally just. scoot it somewhere. but in space. periodt π
πΈ SYNOPSIS πΈ
#include <s3d.h>
int s3d_translate(int object, float x, float y, float z);
yes queen, that's the whole signature. three floats and an object id, that's the vibe π
π DESCRIPTION π
So the way this works is: you take your object and you move it to some position in space. that's it. that's the function.
and here's the thing you need to internalise β when you create an object, it's always located at 0.0, 0.0, 0.0. every single time. freshly created objects are all standing at the origin like they're waiting for the bus π
β οΈ Warning β οΈ Translation is absolute, not relative! this is the part where everyone gets humbled, so listen up bestie π
s3d_translate(object, 2, 0, 0);
s3d_translate(object, 4, 0, 0);
// object will end up at 4,0,0 and not 6,0,0!!
look at that. LOOK at it. you called it twice and it did not add up. it's not a stack, it's not a nudge, it's a SET THE POSITION, FULL STOP situation. the second call doesn't know or care that the first one happened. it just slams your object over to 4,0,0 and calls it a day π
so if you wanted 6,0,0? girl you gotta do the math yourself. this function is not your calculator, she's your teleporter π§
π AUTHOR π
Simon Wunderlich Author of s3d
the literal father of s3d, we stan, we thank him for his service π«Ά
okay that's the whole page, bestie!! this was s3d (that's the source, she's from the s3d project π), manual page S3D_TRANSLATE(3) β go forth and translate things absolutely, not relatively, and don't come crying to me when your object isn't at 6,0,0 πβπ
π¦ where this page comes from
- debian bookworm: s3d-doc 0.2.2.1-5 Β· GPL-2.0-or-later
- debian trixie: s3d-doc 0.2.2.1-7 Β· GPL-2.0-or-later
- ubuntu jammy: s3d-doc 0.2.2.1-3build1 Β· GPL-2.0-or-later
- ubuntu noble: s3d-doc 0.2.2.1-6build3 Β· GPL-2.0-or-later
- ubuntu questing: s3d-doc 0.2.2.1-7build1
- ubuntu resolute: s3d-doc 0.2.2.1-7build3 Β· GPL-2.0-or-later
- ubuntu stonking: s3d-doc 0.2.3-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms