robit_studios's Forum Posts

  • Yann,

    Thanks. Your example is great (although, I'm not sure I am able to grasp how it works completely). But, I implemented it into my engine but I don't think it's going to work.

    What I really need to do is simply be able to test whether an object's position falls within a certain angle of the front of the ship and whether it's on the right or left side of that ship.

    I updated this Capx to show what I'm trying to accomplish. As you'll see it works perfectly as long as the "ship" is at it's default rotation. As soon as you rotate the ship I cannot figure out how to test position of the other object.

    dl.dropbox.com/u/28484936/rotate_issue.capx

    KeePee,

    I see how your idea works but I want to try to avoid doing something like that if I can. Thanks, though!

  • I've been struggling with this issue for awhile and I know there must be an easy answer but I can't come up with it.

    I'm making a top-down space shooter enemy AI. The enemy ship can rotate in any direction. I want to be able to test whether a certain object is within a range of angles relative to the rotation of the ship.

    For example if an obstacle is within 0 to 30 degrees (of the front of the ship) I can make the ship turn left (to avoid it) and if there's an obstacle within 0 to -30 degrees I can make the ship turn right.

    Using the Angle expression doesn't work because it doesn't account for the rotation of the ship.

    And the AngleDiff expression doesn't work because it provides an absolute value and I can't tell whether the object is to the left or right of the ship.

    Here's a simple capx that I hope will demonstrate what I'm trying to accomplish.

    dl.dropbox.com/u/28484936/rotate_issue.capx

    Thanks for the help!

  • Sorry, it looks like this topic has been discussed in previous threads... Guess I didn't look hard enough.

    http://www.scirra.com/forum/ignore-collision-between-physical-objets_topic48028_page2.html

    http://www.scirra.com/forum/disable-collision-for-physics-objects_topic47785.html?KW=

    It looks like the only way to do it for now is by using multiple layers. This might not work for the project I'm working on but I'll give it a try.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi all,

    I've just started playing with Construct 2 (after being a MMF2 user for a long time) and I'm loving it. In particular, the physics.

    There's one issue I've tried to resolve but been unable to. Is there a way for a particular physics object to completely ignore collisions from another object.

    For example: I have two balls at the top of a hill and a wall at the bottom of the hill. I want ball 1 to roll down the hill and bounce off the wall. BUT, I want ball 2 to roll down the hill and PASS THROUGH the wall.

    Is this possible?

    Thanks!