Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075912 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 02:34:44 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Rotating the entire room.
Pages: [1]
Print
Author Topic: Rotating the entire room.  (Read 637 times)
JasonPickering
Level 10
*****



View Profile WWW Email
« on: July 07, 2009, 10:29:22 AM »

hey I have a technical question.

would it be possible to on the press of a button rotate the room in gamemaker, or probably more likely, turn the view and gravity 90 degrees.
Logged

Paint by Numbers
Guest
« Reply #1 on: July 07, 2009, 05:03:44 PM »

Code:
all.image_angle+=90
Put in the event of the button being pressed should change everything's angle.

I don't think you can rotate the view, but you can change its shape using view_xport[] and view_yport[].

A more experienced GM user might know more, but that's an easy way, I think. Shrug
Logged
Andy Wolff
Level 10
*****


-------


View Profile WWW Email
« Reply #2 on: July 07, 2009, 05:12:03 PM »

just change view_angle

You could also do some trig to move everything around a point, but I don't think that's what you're looking for
Logged

ChevyRay
Guest
« Reply #3 on: July 07, 2009, 05:54:41 PM »

What Andy said.

The way I did it in Skullpogo, though, was just to rotate the surface that the room was drawn on, which works as well. But the view_angle method is better in most cases because it doesn't use surfaces, which are incompatible with some graphics cards.

Also, you might find it a pain that any HUD graphics you draw on the screen are also rotated when you use view_angle. To correct this, you can do the following...

I think it looked something like this, a trick Shaltif showed me:

Code:
d3d_set_projection_ortho(0,0,view_wport[view_current],view_hport[view_current],0);
   d3d_set_hidden(0);
   // ---------- DRAW STUFF HERE ----------
   d3d_set_hidden(1);
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic