HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Editing the Map in charactercreator - Placing the character right? [SOLVED]

View previous topic View next topic Go down 
AuthorMessage
Tigg

avatar

Game username : Tigg
Server : Impressive Title by Tigg
Female Posts : 72
Join date : 2017-08-01
Age : 34
Location : Austria

PostSubject: Editing the Map in charactercreator - Placing the character right? [SOLVED]   Sun Aug 13, 2017 10:45 am

Sooo, i have looked through the forum and found the code to change but it didnt work for me, the debugging will give me an error.

I have this code:


Code:
case GAMESTATE_STARTCHARSCREEN:
 if(mCamera->getCamera()->isAttached())mCamera->getActiveCamNode()->detachObject(mCamera->getCamera());
 mCamera->getCamera()->setPosition(3200,120,2770);
 mCamera->getCamera()->setOrientation(Quaternion(Degree(-40),Vector3::UNIT_Y));
 mSkyManager->showSky(true);
 mSkyManager->setDayTime(1810);
 mSkyManager->setWeatherTime(0);
 mSkyManager->setWeatherCycle("");
 mSkyManager->update(evt);
 mWorld->loadWorld(MAP_DEFAULT);
 mCollisionManager->destroyAllPortals();
 mCollisionManager->destroyAllGates();
 mWorld->update();
 mGui->showCharScreenOverlay(true);
 mGui->getCharScreenManager()->reset(true);
 mGui->loadChar();
 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), "Bloom", mGui->isBloom());
 mGameStateManager->setGameState(GAMESTATE_CHARSCREEN);



If i change the unit MAP_DEFAULT to another name it will give me an error.
What do i need to to do?





EDIT:

OKAY, now i have set the map and the cam position for the map, but i need to move over the character and cant find the right code for it. Any help please?

Sorry for this overall and often asked question, i just cant figure it out by myself x,x



So far i have changed this:

MagixHandler.h inside of case GAMESTATE_STARTCHARSCREEN: is:

Code:
Code:
   mWorld->loadWorld("Default");


The position _might_ be this in the same case:

Code:
Code:
               mCamera->getCamera()->setPosition(3200,120,2770);
                mCamera->getCamera()->setOrientation(Quaternion(Degree(-40),Vector3::UNIT_Y));


And this:

Code:
Code:
   mUnit->setPosition(1437, 260, 2685
);

Code:
Code:
   mSceneMgr->getCamera("PlayerCam")->setOrientation(Quaternion(Degree(-50), Vector3::UNIT_Y));
       mSceneMgr->getCamera("PlayerCam")->setPosition(1560, 257, 2480)
;



I changed all coordinates to my new one now, but eh. Wheres that code that tells the playermodel to appear there too?
I looked here: http://www.kitopen.com/t3375-character-screen-solved?highlight=character+screen
But even with these maths, my character is zoomed in the camera and way too high in Edit.
In charscreen i cant even see the characters.

Map stuff is okay, but the playermodel is IN the camera, and right now i dont know know which code of all those source code parts need to be edited to set it to another position.


Last edited by Tigg on Sun Aug 13, 2017 7:35 pm; edited 1 time in total
Back to top Go down
http://www.tiggcreations.com
Wolfess

avatar

Game username : Wolfess
Server : CoA, GoD
Female Posts : 75
Join date : 2011-10-26
Age : 27
Location : PTZ

PostSubject: Re: Editing the Map in charactercreator - Placing the character right? [SOLVED]   Sun Aug 13, 2017 2:45 pm

Hey, I had the same problem when I was making a new default map, I could have helped but I am not currently at home. But I remember that it was about camera values for the editor they are different from default positions about 20 - 15 on both computers and y axis, so try to play with them slightly.
Back to top Go down
Tigg

avatar

Game username : Tigg
Server : Impressive Title by Tigg
Female Posts : 72
Join date : 2017-08-01
Age : 34
Location : Austria

PostSubject: Re: Editing the Map in charactercreator - Placing the character right? [SOLVED]   Sun Aug 13, 2017 2:48 pm

Im trying at the moment xD
Do i need to adjust them in the charscreenmanager and all of them or just some?
I thought about the Y axis too, cause that makes sense xD
Thx for answering, if you get home maybe you can look if i cant figure it out myself? :3


EDIT:

I figured the code to place the model in character screen. But in character CREATOR the model is still behind the camera x,x
Back to top Go down
http://www.tiggcreations.com
Tigg

avatar

Game username : Tigg
Server : Impressive Title by Tigg
Female Posts : 72
Join date : 2017-08-01
Age : 34
Location : Austria

PostSubject: Re: Editing the Map in charactercreator - Placing the character right? [SOLVED]   Sun Aug 13, 2017 5:06 pm

I figured it :3

These parts are important:

Code:
{
 mSceneMgr->getCamera("PlayerCam")->setOrientation(Quaternion(Degree(100),Vector3::UNIT_Y));
 if(!mUnit->getObjectNode())return;
 mUnit->setPosition(1750,76,1005); //edits position in character creator
 mUnit->resetTarget();
 mUnit->setGroundHeight(76);
 mUnit->yaw(Degree(60));
 mUnit->getObjectNode()->yaw(Degree(-120));
 mUnit->setFreeLook(false,false);
 }
 void positionUnitForSelect()
 {
 mSceneMgr->getCamera("PlayerCam")->setOrientation(Quaternion(Degree(100),Vector3::UNIT_Y));
 mSceneMgr->getCamera("PlayerCam")->setPosition(1815,80,1011);
 if(!mUnit->getObjectNode())return;
 const Real tDist = (mUnit->getObjectNode()->getScale().x-1)*-11;
 mUnit->setPosition(1780 - (tDist<0?tDist:0)*0.6, 76 + (tDist<0?tDist:0), 1018 + (tDist<0?tDist:0)*0.6); //edits position in character screen
 mUnit->resetTarget();
 mUnit->setGroundHeight(76 + (tDist<0?tDist:0));
 mUnit->yaw(Degree(60));
 mUnit->getObjectNode()->yaw(Degree(-80));
 mUnit->setFreeLook(false,false);
 mUnit->update(FrameEvent(),mDef);
 }

mUnit->setPosition(1750,76,1005); //edits position in character creator
mUnit->setGroundHeight(76);

Height should be the same here ^ and there v

mUnit->setPosition(1780 - (tDist<0?tDist:0)*0.6, 76 + (tDist<0?tDist:0), 1018 + (tDist<0?tDist:0)*0.6); //edits position in character screen
mUnit->setGroundHeight(76 + (tDist<0?tDist:0));

mUnit->yaw(Degree(60)); //rotates your character in case its needet, i needet it to be changed
Back to top Go down
http://www.tiggcreations.com
Sponsored content




PostSubject: Re: Editing the Map in charactercreator - Placing the character right? [SOLVED]   

Back to top Go down
 
Editing the Map in charactercreator - Placing the character right? [SOLVED]
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support-
Jump to: