BGE, Объект scale хийх

import bge
def main():
    cont = bge.logic.getCurrentController()
    owner = cont.owner
    owner.localScale.x = 2

main()
Объект X тэнхлэгийн дагуу 2 дахин сунгагдана.
import bge
def main():
    cont = bge.logic.getCurrentController()
    owner = cont.owner
    scaler = 0.1
    if (owner.localScale.x>5):
        owner.localScale.x = -owner.localScale.x
    else:
        owner.localScale.x += scaler
main()

Popular posts from this blog

Apache Spark + Cassandra. Hello World