• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML How can i unset camera view target with gml?

P

pyramind

Guest
Hi,

I am new here and gml.

I want to unset camera view target with gml.

I've tried this
GML:
camera_set_view_target(view_camera[0],null);
and this
Code:
camera_set_view_target(view_camera[0],empty);
but not working. What is the equivalent of the "no object" in the gml?

thank you
 
P

pyramind

Guest
I found it after this post.

"noone" is none in gml i guess.

GML:
camera_set_view_target(view_camera[0],noone);
is works perfectly.
 

TailBit

Member
I was thinking you could check one of the other cameras .. but on camera_get_view_target it says:
This function can be used to retrieve the follow target of the given camera. The return value can be an object index, an instance ID or -1 if no follow target has been set.
noone is -4, so I guess it just have to be a negative value ^^
 
Last edited:
Top