About Store Forum Documentation Contact



Post Reply 
Create Object
Author Message
djpercy Offline
Member

Post: #1
Create Object
Hello,

i create a object with follow Code. I create it on the position (1,1,1) and will it move to the pos from my Object.pos. This code is a example. I know i can' write pos so Vec(pos()) that is not my question ;-)

I think this is the wrong type but where i get the right Object type.

PHP Code:
objPoint=Game::Objs.ptrRequire("obj/Testlevel/playerpoint.obj");
   
Game::World.objCreate(*objPointMatrix(objPoint->scale(), Vec(1,1,1)));    
   
   
Matrix m objPoint->matrix;
       
SetMatrix(m);
       
m.pos=matrix().pos;
       
m.normalize();
       
objPoint->matrix=m

Greeting Denis
12-07-2011 04:26 PM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #2
RE: Create Object
Hello,

How can I convert this myObj in a Game::Chr?

PHP Code:
objPoint=Game::Objs.ptrRequire("obj/Testlevel/playerpoint.obj");
Game::Obj myObjGame::World.objCreateNear(*objPointMatrix(objPoint->scale(), Vec(1,1,1))); 

Greetings Denis
12-12-2011 02:21 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #3
RE: Create Object
Code:
Game::Chr *myChr = CAST(Game::Chr, Game::World.objCreateNear(*objPoint, Matrix(objPoint->scale(), Vec(1,1,1)));
12-12-2011 03:21 PM
Find all posts by this user Quote this message in a reply
djpercy Offline
Member

Post: #4
RE: Create Object
Hello,

thank very much :-)

Greetings Denis
12-12-2011 05:32 PM
Find all posts by this user Quote this message in a reply
Post Reply