How do I attach a circle physics object to a particle?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
How do I attach a circle physics object to a particle?
For element 7(in the code), how do I make it so that a new circle physics object is "behind" the particle drawn with the same rotation, position and scale when you draw it? TIA
- Attachments
-
- main.lua
- (8.09 KiB) Downloaded 307 times
Re: How do I attach a circle physics object to a particle?
Um, I just realized that the only particle related X & Y you can retrieve is the emmiter's, so do I make the emiter's position the same as a particle's position? Doubt that it's possible. Is this whole thing plausible?
-
- Prole
- Posts: 18
- Joined: Wed Oct 21, 2009 7:20 pm
Re: How do I attach a circle physics object to a particle?
I asked almost this exact same question about a month ago and the short answer is that you cannot do this.
If you're like me and you thought about using the particle system for shoot em up bullets, then the solution is to make an object for each bullet and track each bullet individually. It's really not that difficult, just seems dumb when the particle system is so legit.
If you're like me and you thought about using the particle system for shoot em up bullets, then the solution is to make an object for each bullet and track each bullet individually. It's really not that difficult, just seems dumb when the particle system is so legit.
Re: How do I attach a circle physics object to a particle?
Good idea. But I noticed that love.physics and adding images to that looks uglier than adding images to love. graphics. And I'm trying to make a very graphical dependent game, so...
-
- Prole
- Posts: 18
- Joined: Wed Oct 21, 2009 7:20 pm
Re: How do I attach a circle physics object to a particle?
I don't really understand what you're saying.
Use a sprite (love.graphics.newImage) and simply have it over the location of the body..
The image itself has nothing to do with love.physics apart from making sure they align. Now, if it looks bad when it's rotated, that's an entirely different problem.
Use a sprite (love.graphics.newImage) and simply have it over the location of the body..
The image itself has nothing to do with love.physics apart from making sure they align. Now, if it looks bad when it's rotated, that's an entirely different problem.
Re: How do I attach a circle physics object to a particle?
Oh, I forgot about about love.sprite. Great now I'm not stuck anymore.
-
- Prole
- Posts: 18
- Joined: Wed Oct 21, 2009 7:20 pm
Re: How do I attach a circle physics object to a particle?
You're welcome
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: How do I attach a circle physics object to a particle?
You might get that "dumb" feeling because of its name. "Particle" certainly sounds like something that could have mass, or could be manipulated. But when you read "Particle", try to read "Image moved by the graphics card so it is very fast".
Having your graphics card interact with LUA or Box2D would just kill the idea.
Particle systems are good for non-interactive stuff, like smoke, explosions, holograms, etc. For interactive stuff, you will certainly need to manage your objects yourself.
Having your graphics card interact with LUA or Box2D would just kill the idea.
Particle systems are good for non-interactive stuff, like smoke, explosions, holograms, etc. For interactive stuff, you will certainly need to manage your objects yourself.
When I write def I mean function.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: How do I attach a circle physics object to a particle?
Exactly, Particle systems are for visual effects only.kikito wrote:Particle systems are good for non-interactive stuff, like smoke, explosions, holograms, etc. For interactive stuff, you will certainly need to manage your objects yourself.
Help us help you: attach a .love.
Re: How do I attach a circle physics object to a particle?
Nice analogy.
Can someone lead me to a good sample of sprites being used? The wiki doesn't thoroughly show me how to implement them..
Can someone lead me to a good sample of sprites being used? The wiki doesn't thoroughly show me how to implement them..
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests