Not logged inOpenClonk Forum
Up Topic local vs. global coordinates

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Newton
Local coordinates are used by the vast majority of functions and in my opinion, this is the right way to go. The standard use case of any object is just that it searches/does/checks for things that are relative to their object position. For any other cases, there is AbsX() and AbsY(). If you search in the source, you will find that it is used in something like 2% of all cases where positions are given.  I imagine that to use global coordinates everywhere will just introduce another source of error to which all scripters and actually especially the experienced scripters are highly prone to.
In scenario scripts (when no object context is available), the functions just work like with global coordinates (as if the object were at 0,0), I see no problem with that.
As a result, I am strongly against option three while option 1 or 2 look equally OK (as it is really a minority of functions which use global coordinates everywhere).

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill