Particles Object & Physics Behavior

For questions about using Classic.

Post » Tue Apr 28, 2009 9:37 pm

Can i make particles launched by Particles Object obey the rules of Physics Behavior?

Actually i wanted to make something like a radar/sonar, so particles will just bounce off the walls and other objects.

Damn, first post. I'm completely new to Construct.
B
1
G
3
Posts: 1
Reputation: 827

Post » Tue Apr 28, 2009 9:52 pm

Nope.

But you can fake it by making your own physics particle spray. Just spawn lots of small physics objects. Just be aware that lots of physics collisions at once are CPU intensive.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Apr 29, 2009 3:28 am

I wouldn't do that if I were you, running physics on an object can be very CPU intensive, so the last thing you want is hundreds of tiny objects running physics. Physics works best with as few larger objects as possible.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sat May 02, 2009 1:11 am

Hummm I just did that :s

I want a particle emitter with a certain bitmap shape, a certain color ramp (multipoint) and a certain opacity ramp (multipoint) AND a certain SIZE ramp (multipoint too). Also, randomization of emission time (and random angle and speed, which are already in the particle behavior)

Easiest way to have it fall realistically was to give it physics... I turned off the collision mask, would that still make it slow?

Btw will we be able to resize physics objects later? or will it still be a problem? :s right now it makes construct crash (I'm piling up them bug reports!)
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat May 02, 2009 7:02 am

I've resized physics objects before with no crashing
it didn't work when I tried it just now though
I guess it's pretty touchy

anyway, for now though if you don't mind the collision mask thing
you can have a non physics object follow it around
here's an example with some random emission stuffs
and growing particles with physics

http://dl.getdropbox.com/u/1013446/particlephys.cap

you can store the current color filter for each sprite in a private variable and you could do the color ramp as well

btw, if it runs super slow on your system, cut down the fade out time on the sprites, it should make it run better
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sat May 02, 2009 8:41 am

Its a bug, and not a bug at the same time. I think whats happening is when you change the sprites size it affects collision detection for the whole world. So changing the size of the sprite should not be allowed, for this particular engine. Also, remember that all crashes are bugs.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Sat May 02, 2009 12:30 pm

If you resize physics objects, it shouldn't crash... but, what it will do is mess up the collision mask for the object as the mask is created at startup. I asked for this to be corrected at one point, but apparantly it's not really do-able because of the way physics works.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Sun May 03, 2009 9:18 am

Report any crash please!
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests