making a smaller collision box for a separate actor

digitalzerodigitalzero Member, BASIC Posts: 639

soooo im having the most difficulty with this and im trying to find the easiest way to get it figured out...

i have an actor that is 60 height and 120 width.... well... i want the actor to be able to collide with enemies with a smaller actor that would be 60 height by 40 width... now i know about the constraint behaviors but that method would not work because of the player actor and all its rules that it has placed... and the only thing that i want is for the x position to be smaller and be able to collide with my enemies not the y position because its going to be the same size....

i know, another one of my horribly explained questions... please bare with me -__-

Comments

  • BBEnkBBEnk Member Posts: 1,764
    edited October 2015

    Make the collision Box your player and constrain the image of your player to that, and to save some time just resize your current player graphic and make it invisible.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    well i would do that but then i would have to make all the player attirbutes game attributes because there is a random attack setting i have placed

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2015

    @digitalzero said:
    well i would do that but then i would have to make all the player attirbutes game attributes because there is a random attack setting i have placed

    Not sure what that means !? I'do just do as BBEnk suggests, resize your main actor to 40 x 60 pixels . . . . and make it invisible . . . then make a second actor that is 120 x 60 pixels, place this actor into the scene and constrain its X and Y coordinates to the main actor.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    well i have collision effects too that mess with the animation @socks... for instance if it collides with the ground and if it moves it does different animations... i have tried to do this and for some reason none of my animations work with this method

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2015

    //

  • digitalzerodigitalzero Member, BASIC Posts: 639

    OH hey @socks should I take out all of the velocity behaviors on the constraint actor??!!

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2015

    @digitalzero said:
    OH hey socks should I take out all of the velocity behaviors on the constraint actor??!!

    Sorry, I don't know the answer to that.

  • ArmellineArmelline Member, PRO Posts: 5,368
    edited October 2015

    So to try to clarify what you're asking:

    You have an actor which need to be able to collide with other things. When these collisions occur, you want different actions to happen depending on the collision that takes place - for example, if Actor A collides with Actor B, you want Actor A to animate through Animation C, but if Actor A collides with Actor C, you want Actor A to animate through Animation D.

    You then want Actor A to have a smaller collision size. You are having difficulty, because if you make Actor A2 and constrain it to Actor A, then when Actor B collides with Actor A2, you need Actor A to animate through Animation C, which it has no way of knowing to do, as the collision occurred with Actor A2.

    Is that correct? The animations are just examples, it could be moves etc. instead.

    If it's one actor you need to do this for, just use game attributes. If it's lots, for example enemy actors, then things get a lot more complicated.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    That's exactly what I'm trying to do! I'm definitely going to have to make game attributes fack!!!

  • ArmellineArmelline Member, PRO Posts: 5,368

    Well I was going to explain, but now I'll just tell you to wait for polygonal collision as you'll beb able to set the exact actor size you want :D

Sign In or Register to comment.