Detect touch side of platform

Let´s say i have a platform Height: 30 and Width: 150. How can i detect if the player actor touch the sides of the platform?
Let´s say if i want to destroy the player actor if it touch the side of the platform. Any easy suggestions on this?

Comments

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

    You can use Vector to angle to detect the angle between the player and the platform, when within a certain range and colliding then the player is touching the sides - you could also do a similar trick with x position, when the player collides and is further away than abs (74.999 + half the width of the player) then the player is touching the sides.

Sign In or Register to comment.