[0.10.2]
Yes, I saw the warning on wiki that collisions with ChainShape can react in a odd manner. But my problem is different, it's due to my own lack of knowledge >.<
that's why I came to ask for help
I'm making a spaceship game. Using the right-click you enable a circle-shaped Shield around you. I choose to use the ChainShape instead of CircleShape, because I don't want my spaceship colliding with the shield.
All the bullets need to collide with the shield, even my own bullet (I don't want the player using shield and shoting at the same time). When a bullet collide with the shield, the bullet is destroyed. Nice. It works beautifully! I could defend myself from a storm of bullets that destroyed me in the same frame that I released the shield. So, the chainshape works fine.
The problem is when I destroy the ChainShape. My bullets get destroyed as if the shield is still there, but part of enemies bullets doesn't get destroyed and reachs me.
(play with mouse and WSAD)
Issue with ChainShape
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- DavidOliveiraSilva
- Prole
- Posts: 19
- Joined: Fri May 29, 2015 10:19 pm
- Location: Quixadá, Brazil
- Contact:
Issue with ChainShape
- Attachments
-
- game.love
- (5.11 MiB) Downloaded 143 times
Re: Issue with ChainShape
Chain shapes are basically a series of edges - very fast moving objects may tunnel through the chain shape,
which can be partially alleviated using the 'SetBullet' option.
In your case I'm not sure why you're not just using a circle shape.
Generally speaking you don't want to be creating/destroying objects all the time,
my suggestion is to keep the shield as a circle shape at all times,
simply change its filtering/masking settings whenever you want to deactivate it.
which can be partially alleviated using the 'SetBullet' option.
In your case I'm not sure why you're not just using a circle shape.
Generally speaking you don't want to be creating/destroying objects all the time,
my suggestion is to keep the shield as a circle shape at all times,
simply change its filtering/masking settings whenever you want to deactivate it.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], immortalx and 2 guests