RenderObject not getting called
by Bill Keller · in Torque Game Engine · 03/24/2004 (6:41 am) · 6 replies
I have created an object and datablock (Tile and TileData), derived from GameBase and GameBaseData. It's largely a copy of Melv's fxRenderObject tutorial. However, Tile::prepRenderImage and Tile::renderObject never get called.
My Tile::onAdd includes:
mObjBox = _datablock->_shape->bounds;
resetWorldBox();
setRenderTransform(mObjToWorld);
addToScene();
and I verified that it's getting called. In the editor, my object shows up in the object list and I can change field values. The bounding box is in the correct place, but nothing is rendered (which makes sense, since renderObject is never getting called).
I have no doubt I'm missing something simple, I just have no idea what it is.
Thanks!!
Take care,
Bill
My Tile::onAdd includes:
mObjBox = _datablock->_shape->bounds;
resetWorldBox();
setRenderTransform(mObjToWorld);
addToScene();
and I verified that it's getting called. In the editor, my object shows up in the object list and I can change field values. The bounding box is in the correct place, but nothing is rendered (which makes sense, since renderObject is never getting called).
I have no doubt I'm missing something simple, I just have no idea what it is.
Thanks!!
Take care,
Bill
#2
My packUpdate looks like this:
I'm not sure about ghosting to the client, how can I check that? I am calling
mNetFlags.set(Ghostable)
in the object constructor.
Thanks!!
Take care,
Bill
03/24/2004 (7:05 am)
The bounding box renders in the editor, but it's empty.My packUpdate looks like this:
U32 retMask = Parent::packUpdate(connection, mask, stream);
if(stream->writeFlag((mask & DataBlockMask) && _datablock != NULL)) {
stream->writeRangedU32(_datablock->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast);
}
return retMask;I'm not sure about ghosting to the client, how can I check that? I am calling
mNetFlags.set(Ghostable)
in the object constructor.
Thanks!!
Take care,
Bill
#3
03/24/2004 (7:17 am)
PackUpdate, unpackUpdate, and onNewDatablock are all getting called. I verified that onNewDataBlock is being called on the client side.
#4
Did you manage to solve this problem? I'm getting exactly the same thing. I've just created a new class derived from fxRenderObject. The bounding box shows up correctly in the editor, but renderObject(...) isn't called.
03/08/2006 (7:46 pm)
Hi Bill,Did you manage to solve this problem? I'm getting exactly the same thing. I've just created a new class derived from fxRenderObject. The bounding box shows up correctly in the editor, but renderObject(...) isn't called.
#5
08/24/2006 (1:53 pm)
I am having the same problem currently. Any of you all find a solution?
#6
08/26/2006 (1:03 am)
I had similar problems when I first did the shadow resource. It turned out to be the transform (client side) was not getting valid data so the object was never in scope and therefore preprender never got called.
Torque Owner Brett Fattori
- Brett