Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Collision Detection |
From: | Gregg Caines |
Date: | Wed, 20 Dec 2000 14:50:16 GMT |
Use 'True', in your hittest():
eg. paddle.hitTest(ballx, bally, True);
Setting that flag to true, makes it check the shape of the clip. Setting it
to false makes it check the bounding box. It should work pretty well if
you use the x and y coordinates of the ball, and use the hittest() method
of the paddle (as opposed to using the coordinates of the paddle and
using the hittest() of the ball).
---------------------------------------------------
Gregg Caines
n e o m e t r i x systems inc.
http://www.neometrixsystems.com
gcainesneometrixsystems [dot] com
> Has anyone here done collision detection using objects that are odd
shapes.
> For example, I am trying to build a pinball game. The paddles are
"baseball
> bat-like" shaped, y'know...like all pinball paddles. Anyways, what would
be
> the best way to detect when these collide? Currently, my paddles have the
> center of the movie clip on one side and then I rotate around that axis.
> Flash fills in the space as if it where part of the movie clip to make it
a
> rectangular shape. So the ball bounces before it ever really gets to the
> paddle. Is there an easy way to do this? By the way, it's in Flash 5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Collision Detection, Scott Jeppesen
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]