Need to change origin point to players position?

  • I'm trying to sort of recreate the playstyle of the game "Realm of the Mad God". If you are unfamiliar with it, Google some footage of it. Notice that in the game, that when you rotate the "camera angle (?) " of the game it rotates around the player.

    To do this, I need to be able to set the origin point to the players position when a certain event occurs, but there is no action for this?

  • Think of it this way:

    You can just rotate the background or choose to rotate a particular layer if you really wish.

    Sounds like you want to rotate a layer or more.

    To do this:

    Event: Pick an Event, whatever will trigger your event.

    Action: Pick the system object and "set layer angle".

    Now when you do that special event, whatever is on that particular layer you picked should rotate. Of course your player can be on a separate layer so the player doesn't rotate.

  • I was thinking of that and other things similar to it, but its not as simple as just rotating the ground or layer etc, because it needs to rotate with the player as the center point. It cant just rotate, otherwise it wouldn't work right, so it needs to have something along the lines of:

    When A pressed: set origin point to Player.x,Player.y

  • will this work for you?

    having your player on a different layer, add an event and action

    System/Every Tick || System/Scroll to Object (pick the player as the Object)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't know what that does, or what it is supposed to do, but no, it did not work. I just need some way to make the ground rotate with the character as the origin or centre point.

  • Here is a quick test - it appears to rotate around the centre of the screen so all I have done is set the scroll to on the player and added a large invisible sprite to use to limit the player from getting too close to the edge of the screen.

    left mouse button and player moves towards mouse. q and e to rotate screen.

    Very basic , needs work, but it appears to work...

    good luck.

  • as in the ground does not rotate but the player does?

    Not what I intended but I think that might work? I can't atm but I will try it later

  • Yes! That is what I wanted! Thank you! Could you send a capx?

  • Posted above in my first post as an attachment - can you see it?

  • I do not have the same version as you, but I tried to recreate it based on what you said in your post, and it just rotates from the center of the object and not the screen?

  • Latest download at the bottom of this page

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)