From 5797b2d64e1402c84bc67a47cf7a82e81ca47923 Mon Sep 17 00:00:00 2001 From: "ulukyn@gmail.com" Date: Tue, 22 Aug 2017 23:22:06 +0200 Subject: [PATCH] Fixed: Resize collision when scale object/npc (using vpb) --HG-- branch : develop --- code/ryzom/client/src/character_cl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 228e3dbde..e73592acd 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -1718,6 +1718,17 @@ void CCharacterCL::updateVisualPropertyVpb(const NLMISC::TGameCycle &/* gameCycl _Instances[0].setScale(CVector(s,s,s)); } + + if (_Primitive) + { + float width, depth; + _Primitive->getSize(width, depth); + UMovePrimitive::TType primtype = _Primitive->getPrimitiveType(); + _Primitive->setPrimitiveType(UMovePrimitive::_2DOrientedBox); + _Primitive->setSize((width / oldCustomScale) * _CustomScale, (depth / oldCustomScale) * _CustomScale); + _Primitive->setPrimitiveType(primtype); + } + }// updateVisualPropertyVpb // //-----------------------------------------------