Position
Setter
setPosition is the only function to set the position of your GameObject. This function gonna set the local position.
gameObject.getComponent<KapEngine::Transform>().setPosition({10, 10, 10}); // OK
gameObject.getComponent<KapEngine::Transform>().setPosition({10, 10}); // OK : z gonna be set to 0
Getter
There is 2 types of getters :
Local : getLocalPosition is to get only the position in parent of GameObject
World : getWorldPosition is to get position of GameObject relative to parent positions
both of these functions return KapEngine::Tools::Vector3.
Last updated
Was this helpful?