Physics objects gravity towards point?

0 favourites
  • 11 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • In short, I'm trying to make a rotating platformer with physics objects without using force action to push them to the center, or simulate physics with force and/or other actions, but I assume I would need to set the gravity to zero.

    Here's a picture, (I don't have a capx file since I haven't even come close to achieving anything working how I want)

    <img src="http://i.imgur.com/Az7RgT9.png" border="0" />

    My other question is about implementing the cone of view or field of vision, like the one in Monaco or Teleglitch. Do I have to work it up from simple Line of Sight behaviour?

  • set planet solid

    make player to platform

    Event: Set Platform angle of gravity to ange(Player.X, Player.Y, Planet.X, Planet.Y) degrees

    Set angle of Player to Player.GravityAngle - 90 degrees

    Nearly the same thing you can do for this block or whatever this black things are :D

  • If I do that and set the blocks to a platform behaviour, how do I make them inanimate so they don't move along with the Player controls?

    Edit: Ah okay, there was the Default Controls Yes/No in Platform behaviour settings, this should work now. Thanks!

    Now theres only the field of vision problem. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • If you descripe that one a bit more I will help you ;)

  • In short objects would block the players vision with opaque or solid color.

    <img src="http://i.imgur.com/BlIA4n7.png" border="0" />

  • Anythere in the forum is a perfect example for that, I will search it.

    Found It: Tutorial

    There were also an .capx but can?t find it, hope this tutorial is enough for you ;)

  • But I'm not trying to do enemy AI line of sight, just the shadows which the tutorial doesn't seem to cover.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is nearly the same, just think about it.

  • Would I just need another layer of black tiles on top of the regular tiles that would change opacity if the player has line of sight to them? But is it possible to do it any other way? Like in the screenshot it's a straight line that moves perfectly with the player, they're not just blocks.

    Although I guess I could make the "shadow" blocks smaller and smaller, but thats more resource intensive isn't it?

  • Can someone tell me whats happening?

    I have the blocks gravity angle set towards the block in the middle

    <img src="http://i.imgur.com/OmdUa7w.gif" border="0" />

    Why do they take off?

  • After some help from a friend I think I finally managed it. Here's the capx of what I was trying to do.

    dropbox.com/s/au651fssm5sljun/hi.capx

    As for the cone of view it started to lag with so many objects, I'm thinking about merging it with the destructible terrain trick to keep the object count low.

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