Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jun 20, 2013 6:54 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Problem with subtract
PostPosted: Sun Jun 17, 2012 12:53 pm 
Offline

Joined: Thu Jul 28, 2011 3:04 pm
Posts: 12
Hi. I have a problem with substract.
In the game implemented destructible walls. Sometimes, for unknown reasons, when a bullet hit the wall, instead of to subtract, add a circle to a polygon wall. I create a circle centered at the point of contact between the bullet and polygon walls, the size is taken at random.

Screenshot:
Image

Code:
Code:
Shape[] shapes = getShape().subtract(new Circle(hit.pt.x, hit.pt.y, size+2, (int) (10+size/3)));


full sources, if needed
http://rghost.ru/38715446

Code with substract are placed in Wall class.

I would be very grateful for the help.
Sorry for my worse english.


Top
 Profile  
 
PostPosted: Thu Jun 21, 2012 3:31 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1477
Could you repost to BUG/RFE forum so this doesn't get lost.
(no mod status here..)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group