Problem with Respawning and collisions

SkyMapleSkyMaple Member Posts: 817
edited November -1 in Working with GS (Mac)
Hey guys! I'm back, and I have a problem! Haha

I have an actor that changes it's self attributes named X and Y to it's current position each level. If I touch the screen the actor moves to the place I touched (by interpolating it's position to the touch position) and if it hits a wall, I have it go back to it's self X and Y attributes. But if I touch beyond a wall, it goes right through it.

How do I fix this? Should I change the interpolate to accelerate towards?

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
    Hey Old Friend ;)
    Basically, this is what you do...
    RULE
    If mouse is down

    RULE All Apply
    TouchX < RightWallX - (RightWallWidth/2)
    TouchX > LeftWallX + (LeftWallWidth/2)
    TouchY > DownWallY + (DownWallHeight/2)
    TouchY < UpWallY - (UpWallHeight/2)

    Interpolate position to touch position

    OTHERWISE (IN 2ND RULE)
    Move back to original positions
  • SkyMapleSkyMaple Member Posts: 817
    Hey nextgen :D

    That is not exactly what I ment, lol. By walls I ment obsticals and things.

    Btw, could you get on skype?
  • RedlerTechRedlerTech Member Posts: 1,583
    lol sure bro
Sign In or Register to comment.