Fixed Position of Object [Solved]

Yesterday I asked a question (old question). Now its working animal and home zoom in and zoom out in reverse action.
Animal is navigating only on map(Home). When I zoom-in animal not on the map(home). Animal is moving from the original place.
See new jsfiddle

Just out of curiousity: what’s the point of such effect?
When you scale the level and navmesh, position of the animal is still the same as it was, as scaling doesn’t affect its position.

so what to do for change position according to map.

var factor = ( e.deltaY < 0 ) ? 0.9 : 1.1;
animal.scale.multiplyScalar( factor );
animal.position.multiplyScalar( factor )

I tried position but not affecting

So, it looks like multiplying the position by a scalar is not going to work in the same way as multiplying scale does.
What else have you tried?

1 Like

i have done this

window.addEventListener( ‘wheel’, wheelUp, true );

   function wheelUp(event){
     var factor = ( event.deltaY < 0 ) ? 0.9 : 1.1;
      animal.scale.multiplyScalar( factor );
			console.log("in wheel");


thank you @looeee & @prisoner849

1 Like