Restraining an actor from exiting the screen

Non-platform specific questions.

Restraining an actor from exiting the screen

Postby motorollin » Sun Aug 12, 2007 10:34 pm

How do I stop an actor from leaving the screen when it reaches the edge of the view? I don't want the screen to scroll and I want the actor to stop when it hits the edge. I tried creating a wireframe region at each edge of the view and creating a collide event for each one which sets the velocity multiplier of the event actor to 0, but sometimes the actor jumps all the way across the region and disappears off the screen (particularly on the left hand side for some reason)

TIA
moto
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score

Postby d-soldier » Sun Aug 12, 2007 10:38 pm

I've had this exact same issue while framing the view with both wireframe and filled regions... I do recall getting a better response when I made the regions much bigger, and overlapping eachother... but I've found that a single hollow rectangle image .gif file gets the results better then the regions did.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby motorollin » Sun Aug 12, 2007 10:48 pm

That did the trick. Thanks!
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest