Jump to content


Photo

Turn Camera Upside Down?


  • Please log in to reply
8 replies to this topic

#1 yDNA

yDNA

    GMC Member

  • New Member
  • 57 posts

Posted 12 December 2008 - 09:25 PM

I'm making a platformer, and I want the view to be turned upside down for one of my levels. Is this possible? If so, how would I do it?
  • 0

#2 mrperson

mrperson

    GMC Member

  • New Member
  • 513 posts

Posted 12 December 2008 - 09:26 PM

Just change the sprites and everything so theyre upsidedown.
  • 0

#3 desertdweller

desertdweller

    Love Truth

  • New Member
  • 1255 posts

Posted 12 December 2008 - 09:27 PM

You could try view_angle[0] = 180. That should do the trick...I think.
  • 0

#4 yDNA

yDNA

    GMC Member

  • New Member
  • 57 posts

Posted 12 December 2008 - 09:28 PM

Is there a way to do that, other than simply making duplicates of every sprite upside down? Could there possibly be a single object in the room that makes every sprite redraw itself upside down?
  • 0

#5 mrperson

mrperson

    GMC Member

  • New Member
  • 513 posts

Posted 12 December 2008 - 09:31 PM

Is there a way to do that, other than simply making duplicates of every sprite upside down? Could there possibly be a single object in the room that makes every sprite redraw itself upside down?

Yes, that would work if its in the room start event.
  • 0

#6 yDNA

yDNA

    GMC Member

  • New Member
  • 57 posts

Posted 12 December 2008 - 09:32 PM

I tried putting an invisible object in the room with the line of code mentioned above in it's Step event, didn't do anything. =\

EDIT: Nevermind, it somehow didn't save when I put it in, and it never got in there. It works now, thanks!

Edited by yDNA, 12 December 2008 - 09:33 PM.

  • 0

#7 mrperson

mrperson

    GMC Member

  • New Member
  • 513 posts

Posted 12 December 2008 - 09:33 PM

I tried putting an invisible object in the room with the line of code mentioned above in it's Step event, didn't do anything. =\

What was the code exactly?
  • 0

#8 desertdweller

desertdweller

    Love Truth

  • New Member
  • 1255 posts

Posted 12 December 2008 - 09:34 PM

Is there a way to do that, other than simply making duplicates of every sprite upside down? Could there possibly be a single object in the room that makes every sprite redraw itself upside down?

Yes, that would work if its in the room start event.

You could have in the creation code for that room

with (all)
   {
   sprite_yscale = -1;
   }


That would flip each sprite upside down individually, while my previous code will essentially rotate everything around the center of the room 180 deg.
  • 0

#9 acrog2

acrog2

    average user

  • GMC Member
  • 1118 posts

Posted 13 December 2008 - 12:06 AM

or:
create:
PRE
sur = surface_create(room_width,room_height)
set_automatic_draw(0)

end step:
PRE
surface_set_target(sur)
screen_refresh()
surface_reset_target()
d3d_transform_set_scaling(1,-1,1)
draw_surface(sur,0,0)
d3d_set_identity()


-acrog2
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users