|
-
Simple hitest question
Hi there!
I have always used the "if(object.hitTest(object2)){};" hitTest BUT;
I am workin on a platform game and I want to use the one which tests the shape rather than bounding box. I have no idea how to use it. I have tried the following;
if(this.hitTest(_root.mov._x,_root.mov._y,true){};
if(_root.mov.hitTest(this._x,this._y,true){};
if(_root.mov.hitTest(x,y,true){};
none of these have worked for me
PLEASE HELP ME!!!
Thanks
-
Script kiddie
if(this.hitTest(_root.mov._x,_root.mov._y,true){};
if(_root.mov.hitTest(this._x,this._y,true){};
if(_root.mov.hitTest(x,y,true){};
All of these are wrong, try one of these, depending on the desired effect:
if (this.hitTest(_root.mov._x, _root.mov._y, true)) {
trace('Collision detected!');
}
if (_root.mov.hitTest(this._x, this._y, true)) {
trace('Collision detected!');
}
-
Custom User Title
The problem was just a single )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|