[AS3] Question about walls

Post and discuss creative ideas

[AS3] Question about walls

Postby Lanth » Wed Feb 15, 2012 10:50 am

Lil question:
How do I create a vertical wall with which you can collide. (So you don't run through it/get teleported on top.)

Thank you :)

TL;DR
Solid brick wall plz, ty.
herpderp
User avatar
Lanth
Newly Registered
 
Joined: Wed Feb 15, 2012 10:43 am

Re: [AS3] Question about walls

Postby Diuberus » Tue Mar 20, 2012 9:42 am

The more simple way is to use the hitTestObject() or hitTestPoint() functions of the MovieClip class.

There is some examples in the doc :
http://help.adobe.com/en_US/FlashPlatfo ... estObject()

So ou can made something like :

Code: Select All Code
if (acteur.hitTestObject(wall)) {
// Change the position of your actor
}
Diuberus
 
Joined: Sun Mar 18, 2012 10:24 pm
Location: France


Return to Discussion



Who is online

Users browsing this forum: No registered users