-
[CS3] need help hittest
i made my character for a game and i made walls which work here is the code
onClipEvent (enterFrame) {
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
}
but half of my character still goes through the wall before it acutally calls the code
how do i stop this?
please help
thanks Hopies
The one that smiles when things go wrong, Has thought of someone to blame it on
-
Senior Member
I usually use
if (this.hitTest(_root.wall)){
//do stuff
}
I find it a bit more efficient.
-
now my character dont move at all should i add that the wall is one movieclip in the shape of a maze
The one that smiles when things go wrong, Has thought of someone to blame it on
-
can anyone HELP please thanks
The one that smiles when things go wrong, Has thought of someone to blame it on
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
|