preview
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
preview [2020/04/22 11:49] – vjraymon | preview [2020/04/22 11:50] – vjraymon | ||
---|---|---|---|
Line 5: | Line 5: | ||
function MY_CUSTOM_COMPONENT: | function MY_CUSTOM_COMPONENT: | ||
- | | + | |
- | | + | |
- | -- to _globalPosition - 1000 | + | -- to _globalPosition - 1000 |
- | -- only on objects with a WATER flag | + | -- only on objects with a WATER flag |
- | local FromPosition = { _globalPosition[1], | + | local FromPosition = { _globalPosition[1], |
- | local ToPosition = { _globalPosition[1], | + | local ToPosition = { _globalPosition[1], |
- | if not self: | + | if not self: |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | MyMod: | ||
.. tostring(_globalPosition)) | .. tostring(_globalPosition)) | ||
- | return _globalPosition[2] | + | |
- | else | + | else |
- | | + | return raycastResult[" |
+ | end | ||
end | end | ||
- | end | ||
You can do the same with the ground by replacing OBJECT_FLAG.WATER by OBJECT_FLAG.GROUND | You can do the same with the ground by replacing OBJECT_FLAG.WATER by OBJECT_FLAG.GROUND |