sets the position of the game object instance * The position is relative to the parent (if any). The global world position cannot be manually set. * * @name go.set_position * @param position [type:vector3] position to set * @param [id] [type:string|hash|url] optional id of the game object instance to set the position for, by default the instance of the calling script
| 991 | * ``` |
| 992 | */ |
| 993 | int Script_SetPosition(lua_State* L) |
| 994 | { |
| 995 | Instance* instance = ResolveInstance(L, 2); |
| 996 | dmVMath::Vector3* v = dmScript::CheckVector3(L, 1); |
| 997 | dmGameObject::SetPosition(instance, dmVMath::Point3(*v)); |
| 998 | return 0; |
| 999 | } |
| 1000 | |
| 1001 | /*# sets the rotation of the game object instance |
| 1002 | * The rotation is relative to the parent (if any). The global world rotation cannot be manually set. |
nothing calls this directly
no test coverage detected