Share your ZGE-development tips and techniques here!

Moderator: Moderators

User avatar
Posts: 1648
Joined: Sat Feb 23, 2008 11:15 pm


Postby Kjell » Thu Jan 24, 2013 10:49 pm


Perhaps super obvious .. but in case you dislike using "CurrentModel" to access build-in properties of a Clone from itself ( because it's too lengthy ), you can create a "alias" by assigning "CurrentModel" to a ( local ) model variable.

So for example, instead of ..

Code: Select all

CurrentModel.Position.X = 8.0;
CurrentModel.Rotation.Z = 0.5;

.. you could use ..

Code: Select all

model this = CurrentModel;

this.Position.X = 8.0;
this.Rotation.Z = 0.5;

The performance penalty for doing this is pretty much neglectable.


Return to “Tips'n'Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest