Jump to content

[SOLVED] [2.0] a bug in editor_controls.h


photo

Recommended Posts

hi . we found a bug in the eidtor_controls.h and a fix blow.

the current code will have issue when we update the a dynamic mesh  and try to focus the mesh.

without the fix, focus will jump to somewhere as the return boundsphere is not right.

	// WorldBoundSphere bs = object.getWorldBoundSphere(surface);
	// target_position = bs.getCenter();
	// distance = bs.getRadius() * 3.0f;
	BoundSphere bs = object.getBoundSphere(surface);
	target_position = object.getWorldTransform()*bs.getCenter();
	distance = bs.getRadius() * 3.0f;
Link to comment
×
×
  • Create New...