collide issue?

Im not sure if this is a physics question, or collide issue.
whats the best effective way to stop an actor hitting a block so the actor can climb it or get over it.

Comments

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 Stop an actor hitting a block so the actor can climb it or get over it ? Do you mean a moving block thats moving towards an actor and stops when it collides ? Then jump on this block ?

  • sonicm3sonicm3 Member Posts: 141

    sorry i mean a wall, so actor cannot get over it.

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 put a collide behaviour in the actor , collide with wall.

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    actaully @icebox just while im on this subject of physics.

    if i have gravity turned on.
    im trying to make a block fall when i touch it, but i thought this would work?

    inside the block//

    IF overlaps or collides with MAN
    do
    change attribute
    self.physics.movable : TRUE

    but it doesnt work.

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 its better to control the gravity of each actor by itself with an accelerate behaviour.

    Block if overlaps or collides with man
    do
    accelerate direction 270 (down) and the speed you want

    You cant change physics movable during gameplay so this wont work , if you have it set moveable it will stay moveable.

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    @icebox yea i wasnt sure, i did already try that and doesnt seem to work, when i gravity on the scene, as all my work has been done with gravity.

    edit, just tested it and it doesnt seem to work for me, are the only commands for the block only?

    im tired n cant seem to work this out.
    when i enable movable with gravity off, it works.. argh

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 set moveable true when you use accelerate it should work

  • sonicm3sonicm3 Member Posts: 141

    if i tick the box will it not just fall off the map as soon s i click play?

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 thats where you have it collide with the ground

  • sonicm3sonicm3 Member Posts: 141

    ah right , i think im confused.

    so i keep gravity ON and keep movable off.

    then what would i put inside the block to make it work. (ive got it working with some triggers and boolean and destroy actor ) but i really want this part to be simple.

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 Switch scene gravity off ... turn moveable on for actors that you want to be affected by gravity .

    On the actor itself
    Accelerate set the direction to 270 and speed to what ever you want.. do some testing

    if you want the gravity to apply on a certain condition then create a rule with your condition and on " do " put the accelerate behavior.

    it will fall down , so if you want your actor to stand on another actor(block) , put a collide behaviour and let it collide with the block.

    the block wouldnt require gravity and it wont move so set its moveable attribute to false.

  • sonicm3sonicm3 Member Posts: 141

    yea ive done that now, i did it with lots of triggers but as you say, probably easier to turn gravity off on this particular level and use accelerate. Thanks again mate for taking the time to help and advise me.

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 You welcome glad i could help :)

Sign In or Register to comment.