Does ogre allow to attach the same object multiple times? Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
r0ut
Halfling
Posts: 44
Joined: Mon Feb 22, 2021 6:25 pm
x 2

Does ogre allow to attach the same object multiple times?

Post by r0ut »

Ogre Version: 1.12

Does ogre allow to attach the same object multiple times? If yes, how can I check if the object is already attached?
This is what I'm currently doing but I'm not sure if it will return null all the times

Code: Select all

if (mTarget.getAttachedObject(mCamera.getName()) != null) { 
    mTarget.detachObject(mCamera);
}
Last edited by r0ut on Wed Mar 10, 2021 3:46 pm, edited 1 time in total.
r0ut
Halfling
Posts: 44
Joined: Mon Feb 22, 2021 6:25 pm
x 2

Re: Does ogre allow to attach the same object multiple times?

Post by r0ut »

Found what I needed. Instead of creating a new Node I just did

Code: Select all

var camNode = mCamera.getParentSceneNode();
Post Reply