1

For some reason I can't zoom in.

view_xview[0] = view_xview[0] - 100;
view_yview[0] = view_yview[0] - 100;
view_hborder[0] = view_xview[0] / 2;
view_vborder[0] = view_yview[0] / 2;

While using these, the zoom event works fine but it zooms to the left corner so I added these and created an instance named 'obj_cview' but zoom event doesn't worked after this.

if instance_exists(obj_cview) view_object[0] = obj_cview;

These are all codes inside my object, space button triggers them.

view_angle[0] = -10 + random(30);

if instance_exists(obj_cview)
   {
   view_object[0] = obj_cview;
   }

view_xview[0] = view_xview[0] - 100;
view_yview[0] = view_yview[0] - 100;
view_hborder[0] = view_xview[0] / 2;
view_vborder[0] = view_yview[0] / 2;

audio_play_sound(snd_cchange,1,0);

instance_destroy(self);
braaterAfrikaaner
  • 1,072
  • 10
  • 20
ZozeR
  • 78
  • 1
  • 10
  • 1
    not sure what you call a "zoom", but to zoom (enlarge) you should change view_wview and view_hview (width and height), not X/Y position, as it's only moves around room. H/V border is how many pixels from edge when move starts to follow object (so all in center is "dead zone" then). HBorder/VBorder should be at max half of wview/hview. – gnysek Mar 27 '18 at 08:43
  • thank you it did worked after changing x/y with h/w – ZozeR Mar 27 '18 at 20:32

0 Answers0