Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Efficient Room Rotation [GM7-Pro]


Recommended Posts

Okay, I have a basic setup just to see what it would look like:

ObjRotateView:

CREATE EVENT

alarm[0] = 1;[/CODE]

[b]ALARM [0][/b]

[CODE]
view_angle += 5;
alarm[0]=15;
[/CODE]

So far, it looks decent, but I can't keep Sonic from rotating with the view. I tried this:

[b]Sonic Step Event:[/b]

[CODE]image_angle = 0;[/CODE]

Well, I see the basic idea and all, but how am I suppose to keep Sonic from rotating?

Link to comment
Share on other sites

What engine are you using? If you're using Sonic Dash, there should be a global.GravityAngle variable; change this based on the view_angle to have the player bound to the view_angle. Otherwise, you'll have to implement something similar yourself by looking at the Xmas Example.

I am using an engine similar to the Sonic Dash engine. It has the global.gravity_angle function. I tried playing around with it, but I cant seem to stop the player from being thrown out of the view. Can someone post an example or something?

Link to comment
Share on other sites

What if all the sprites in the room had the same origin?

I don't think you can change a single instance's origin, since origin is stored per sprite (of which there is only one to span across all objects). View rotation is easier.

Okay, I have a basic setup just to see what it would look like:

ObjRotateView:

CREATE EVENT

alarm[0] = 1;[/CODE]

[b]ALARM [0][/b]

[CODE]
view_angle += 5;
alarm[0]=15;
[/CODE]

So far, it looks decent, but I can't keep Sonic from rotating with the view. I tried this:

[b]Sonic Step Event:[/b]

[CODE]image_angle = 0;[/CODE]

Well, I see the basic idea and all, but how am I suppose to keep Sonic from rotating?

What you need to do is:

[CODE]image_angle = -view_angle;[/CODE]

That way (drawn angle) = image_angle + view_angle = 0. Or something.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...