Power Hedgehog Posted November 28, 2008 Report Share Posted November 28, 2008 For a special stage, I wanted to know the best way to make a Sonic 1 styled room rotation. I tried it with all the floor objects rotating, but it caused lag, and it looked very ugly. Does anyone know how to achieve this a different way? Link to comment Share on other sites More sharing options...
Sponick Posted November 29, 2008 Report Share Posted November 29, 2008 Just play with the variable view_angle, and set the graviti direction to -view_angle-90. Link to comment Share on other sites More sharing options...
Power Hedgehog Posted November 29, 2008 Author Report Share Posted November 29, 2008 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 More sharing options...
LarkSS Posted November 29, 2008 Report Share Posted November 29, 2008 Can't you just delete the conditions that cause Sonic to rotate his animation? Link to comment Share on other sites More sharing options...
dark team Posted November 29, 2008 Report Share Posted November 29, 2008 Most likely you're using the same view with Sonic and your rotating it, to use the other view just change view_angle to view_angle[1,2,3...etc]. Link to comment Share on other sites More sharing options...
VectorSatyr Posted November 29, 2008 Report Share Posted November 29, 2008 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. Link to comment Share on other sites More sharing options...
Power Hedgehog Posted November 29, 2008 Author Report Share Posted November 29, 2008 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 More sharing options...
Chaos Rush Posted November 29, 2008 Report Share Posted November 29, 2008 Or instead of changing the view angle, you could have all the moving objects in the special stage have the sprite angle change instead. It would be like this: Create event: alarm[0] = 1;[/CODE]Alarm 0 event:[CODE][B]image[/B]_angle += 5;alarm[0]=15;[/CODE] Link to comment Share on other sites More sharing options...
VectorSatyr Posted November 29, 2008 Report Share Posted November 29, 2008 That won't work; they'll just rotate around their sprite's origin point. You want them to rotate relative to the entire room. Rotating the view at least comes close. Link to comment Share on other sites More sharing options...
Chaos Rush Posted November 30, 2008 Report Share Posted November 30, 2008 That won't work; they'll just rotate around their sprite's origin point. You want them to rotate relative to the entire room. Rotating the view at least comes close. Ouch, sprite origins. Didn't think of that. What if all the sprites in the room had the same origin? Link to comment Share on other sites More sharing options...
Kain Posted December 1, 2008 Report Share Posted December 1, 2008 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 More sharing options...
Recommended Posts