Jump to content

Show Scale in Syncker Debug


photo

Recommended Posts

Posted

Hello,

Would it be possible to display the Scale and World Scale of a node in the Syncker Debug Window?

Currently there is Position+Rotation in local and World coord. I'm missing the Scale, because I've apparently a bug where it looks like node::setWorldScale is not being applied to a node.

Thanks!

Posted

Hi Silent. There is no physics on the node. It's stored as a NodeReference on disk and loaded with World::loadNode (2.13.1.1). The node hierarchy is just a NodeDummy with a child ObjectMeshStatic. I call setScale or setWorldScale on the root node (ie the dummy). A console dump shows that the scale should be applied indeed but the size of the object in the world doesn't change (master only, I don't even look at the slave right now). This is strange. Here is the code used:

if (_parallax = World::loadNode("Crosshair.node")) {
	syncker->addSyncNode(_parallax);
	_parallax->setLifetime(Node::LIFETIME_ENGINE);
	_parallax->setEnabled(true);
}
...
_parallax->setParent(parent);
if (ObjectPtr o = World::getIntersection(src, dst, 0x80000000U, wi)) {
	_parallax->setWorldPosition(wi->getPoint());
	_parallax->setWorldDirection(wi->getNormal(), vec3::UP, Math::AXIS_NY);
	Console::onscreenMessageLine(">%f", _parallax_scale); //< this value is '2'
	_parallax->setScale(vec3(_parallax_scale));
	Console::onscreenMessageLine("=%f", _parallax->getScale().x); //< this prints '2' so everything should be ok
}
//< but visually, nothing changes, whatever I put in '_parallax_scale'

 

Posted

Hello, any idea why I have this peculiar effect (size change not visible). This is in an, IG so I can't test without the Syncker, but as I said the issue is visible on the master too.

Posted

Ok, thanks, I'll try on 2.14-15 then

×
×
  • Create New...