Contact points for physics

This forum is currently in read-only mode.
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • I've been talking with the devs about this sort of thing in the chat, but I think it warrants it own topic, too. Over at Sonic Fan Games HQ, Damizean, who is renouned in the community for his Sonic engines, noted a rather interesting suggestion...

    [quote:2zh3aghk]Hmm, actually, it would be better if they actually implemented contact points list for the Box2D physics system. With proper collision detection, we could create an awesome Sonic engine with it. (Basically, there would be no need for angle detection system, as we could find out the angles from the contact points, it would fix all the problems with the current system.

    Box2D actually implements the contact points as it's on the library's API. They only would need to construct the callback class and add refactor it (Plus, contact points from per pixel collisions would be suicide, this is only suitable for the Physics engine).

    This could have a multitude of different applications besides angles, as David noted, it stores data on "position, veleocity, normal, fraiction, restituation(elasticity)", and others...

    [quote:2zh3aghk]

    (20:29:43) David: we have a collision listener used already which has access to a b2ContactPoint

    (20:29:52) David: so I guess its just a case of storing point data appropriately

    (20:30:24) Candescence: Wait, so could this be used in Construct at the present?

    (20:30:26) Mipey: Is this stuff for the box rotating if an angle is hit?

    (20:30:27) David: so you would have expressions:

    GetContactPointx(index)

    GetContactPointy(index)

    GetContactCount()

    (20:30:42) David: its not accessable to u guys no

    (20:30:53) David: but it looks like we can impliment it

    (20:31:04) Shviller: Hm, I guess those expressions would suffice.

    (20:31:48) Candescence: Wait, so we can do contact points with expressions? Why not just go ahead and make it a full-on feature?

    (20:31:53) David: ah theres more data in points

    (20:31:58) David: i thought points would be points lol

    (20:32:02) David: but they contain

    (20:32:14) David: position, veleocity, normal, fraiction, restituation(elasticity)

    (20:32:18) Mipey: DNA of aliens?

    (20:32:23) Mipey: Aw.

    (20:32:31) Candescence: Angle?

    (20:32:43) David: angle is normal

    (20:32:49) David: normal means angle i mean

    (20:33:01) Candescence: Ah.

    (20:33:01) Mipey: vector?

    (20:33:21) Shviller: well, normal is a vector, but only it's direction (angle) is meaningful

    (20:33:43) Shviller: normal is a 1-length vector perpendicular to the surface

    (20:34:10) Mipey: I see

    (20:35:01) David: yeah ur right it is a b2Vec2...which is vector

    (20:35:07) David: but i can turn it into an angle

    (20:35:52) David: i'm just not quite sure how it works heh

    (20:36:03) David: like if u have a ball and drop it on the ground

    (20:36:10) David: will the normal point upwards

    (20:36:29) Shviller: ...or downwards.

    (20:36:40) David: mm...experimentation will be the key heh

    (20:36:40) Mipey: Direction of the impact force?

    (20:36:52) Mipey: And you could get bounce angle from that normal.

    (20:36:52) Shviller: pretty much

    (20:37:14) Mipey: Or use it to push the object further

    (20:37:18) Candescence: So, basically... Contact points have a variety of different purposes in this case?

    (20:37:19) Mipey: Like playing Pool

    (22:33:05) Candescence: Okay, before I knock off to bed, what's the chances of contact points getting into the next build?

    (22:34:37) David: random(100)% chance

    (22:34:49) Candescence: XD

    (22:34:59) Candescence: But seriously.

    (22:35:30) Mipey: I wouldn't have too high expectations... saves me from disappointments.

    (22:35:33) David: well i'll pass it on to Ashley but he'll probably say its a post 1.0 feature

    (22:36:31) Mipey: If it in your opinion simplifies the physics collision system, then it probably would be fundamental enough to be implemented. Otherwise... it might get tagged as feature bloat?

    (22:36:32) David: which is starting to sound like our equivalent of 'it was programmed to do that'

    (22:37:11) David: it wouldn't simplify or complicate, its just a feature...requires adding some new expressions and adding code into a callback

    Really, it could be quite useful for a variety of detections. Good idea, or no?

  • yes its a good idea, but im unsure of what they are, the point which a collision happens at?

    also, it sounds like a good oppertunity for david to break some more things xD, hence ashleys supposed reply

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, that's pretty much what it means, to my knowledge.

    Also, lol. XD

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