Login Register
Frontpage Code library Pastebin

ObjectSX() & ObjectSY()

Author: Viltzu
Added: 9.4.2011 20:50
Edited: 15.4.2011 22:19
Category: Objektit

Description

Kertovat objektin sijainnin ruutukoordinaattien mukaan. Ottaa myös kameran huomioon.

Code

Select all
1
2
3
4
5
6
7
Function ObjectSX(obj)
    Return ObjectX(obj)+ScreenWidth()/2-CameraX()
EndFunction

Function ObjectSY(obj)
    Return -ObjectY(obj)+ScreenHeight()/2+CameraY()
EndFunction

Comments

No comments. You can be first!

Leave a comment

You must be logged in to comment.