Turning the Fixture into a sensor might be what you want, rather than using collision filtering.Dr.Tyler O. wrote:Is it possible to use Fixture:setFilterData() while still letting those fixtures produce collision callbacks? I'm aware that it sounds silly but the collision callbacks are what I'm using to detect whether the players in my video game touch items. I just don't want the items to slow the player down with collisions.
"Questions that don't deserve their own thread" thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: "Questions that don't deserve their own thread" thread
- Dr.Tyler O.
- Citizen
- Posts: 58
- Joined: Tue Jul 29, 2014 9:17 am
- Location: United States
Re: "Questions that don't deserve their own thread" thread
But, from my understanding, sensors don't collide with anything. I need to make it so that the body only collides with static bodies.slime wrote:Turning the Fixture into a sensor might be what you want, rather than using collision filtering.
Any topic I have ever posted that I felt did not require a .love file, although they were requested, never required one so I would appreciate if you did not ask me to supply one unless you think that I am ignorant for not doing so.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: "Questions that don't deserve their own thread" thread
Then have a look at [wiki]Fixture:setCategory[/wiki], [wiki]Fixture:setMask[/wiki] and [wiki]Fixture:setFilterData[/wiki].
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: "Questions that don't deserve their own thread" thread
Ah thanks slime, didn't know you didn't have to use all the indices. My knowledge of C++ is very limited. It's very sad, I know assembly more than C++.
-
- Party member
- Posts: 106
- Joined: Sat Jun 21, 2014 3:45 pm
Re: "Questions that don't deserve their own thread" thread
In XNA you can add any texture to a single spritebatch, in Love2D you need a separate spritebatch for every separate texture. What's up with that?
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: "Questions that don't deserve their own thread" thread
The concept behind a LÖVE SpriteBatch is a little different from the concept behind an XNA SpriteBatch, even though they have the same name. LÖVE's can get drastically better performance in many situations as a result, but they're slightly less flexible.
Switching between different textures within a single begin-end pair an XNA SpriteBatch comes at a performance cost, and that cost would be there in LÖVE as well if that feature was implemented. You'll get the best performance in both frameworks by using Quads (or their equivalent) with a texture atlas and a SpriteBatch.
Switching between different textures within a single begin-end pair an XNA SpriteBatch comes at a performance cost, and that cost would be there in LÖVE as well if that feature was implemented. You'll get the best performance in both frameworks by using Quads (or their equivalent) with a texture atlas and a SpriteBatch.
-
- Party member
- Posts: 106
- Joined: Sat Jun 21, 2014 3:45 pm
Re: "Questions that don't deserve their own thread" thread
Is there a possibility you guys could add another spritebatch class that'd behave like it does in XNA? I am using an atlas texture + quads + spritebatch to draw the world, but for misc objects I'm in a need of said flexibility that the XNA spritebatch provides.slime wrote:The concept behind a LÖVE SpriteBatch is a little different from the concept behind an XNA SpriteBatch, even though they have the same name. LÖVE's can get drastically better performance in many situations as a result, but they're slightly less flexible.
Switching between different textures within a single begin-end pair an XNA SpriteBatch comes at a performance cost, and that cost would be there in LÖVE as well if that feature was implemented. You'll get the best performance in both frameworks by using Quads (or their equivalent) with a texture atlas and a SpriteBatch.
Re: "Questions that don't deserve their own thread" thread
How would I add multiple shaders to the same image? This obviously wouldn't work since the second shader would overrule the first one.
So I guess I need to draw the image to a canvas, apply the first shader, update the canvas and then apply the second shader to the canvas? If so, should the canvas be updated in the update() callback?
Code: Select all
love.graphics.setShader(foo);
love.graphics.setShader(bar);
buttons:draw();
love.graphics.setShader();
Re: "Questions that don't deserve their own thread" thread
How would one delete an entity? Like, completely wipe it from the current game. I.e, once an enemy is defeated, to delete it completely so it doesn't show up, follow the player, do anything that it would normally do.
Re: "Questions that don't deserve their own thread" thread
Usually entities are stored in a table, so to get rid of it you find its key in that table and then set that value to NIL.
Of course, the harder part is to make sure that any other references to it are also dropped, but that depends a bit on how your game is designed, I think.
Of course, the harder part is to make sure that any other references to it are also dropped, but that depends a bit on how your game is designed, I think.
Who is online
Users browsing this forum: Bing [Bot] and 9 guests