Phun - 2D physics sandbox - forum

Official Forum

You are not logged in.

#1 2009-05-30 06:40:58

lollerman
Post Manic
From: Finland>Funland>Phunland!
Registered: 2008-10-24
Posts: 921
Website

Add attraction distance

im pretty sure this has been suggested but i didnt find it by using search tool once so...

add distance for attraction. (how fast the force grows when moving closer) and make the attraction to disappear if some thing is too far.
this would be good because attraction cant be used in complex things because it pulls everything to it, no matter how far it is (well there will always be little force) like real magnets wont pull a nail to it from distance of 10 meters but if its 5 mm from it, you almost cant pull it off the magmet.


qqqqqqqq☻ <--- this is a worm, worms name is bob (of course) help bob to eat the other bobs head ---> ☻

^ that is the signatrue, help signature take over the forums!

Offline

 

#2 2009-05-30 11:35:34

Fourex
Member
From: San Rafael, CA
Registered: 2008-08-13
Posts: 44

Re: Add attraction distance

i support this!
it would make attraction a lot more useful. i once tried to make a "magnetized" conveyor belt to carry marbles to the top of a marble machine i was making, but when it was strong enough to make the balls stick to it, it was also strong enough to pull marbles to it when they were going through the marble course. (yes, it was on quadratic)

Offline

 

#3 2009-05-30 11:38:08

Versieon
Respected Member
From: FÜAM (Its a disease!)
Registered: 2009-03-17
Posts: 151

Re: Add attraction distance

for your marble machine, you can just change the collision of the marbles to something other than the magnet, then they won't be attracted, or vice versa.


Ah...so many pedestrians, so little time...

Offline

 

#4 2009-05-30 11:39:13

Fourex
Member
From: San Rafael, CA
Registered: 2008-08-13
Posts: 44

Re: Add attraction distance

Versieon wrote:

for your marble machine, you can just change the collision of the marbles to something other than the magnet, then they won't be attracted, or vice versa.

but then they would not stick to the conveyor belt...

Offline

 

#5 2009-05-30 12:35:08

chronos
banned!
From: california (like AFI!)
Registered: 2008-06-30
Posts: 4885
Website

Re: Add attraction distance

Fourex wrote:

Versieon wrote:

for your marble machine, you can just change the collision of the marbles to something other than the magnet, then they won't be attracted, or vice versa.

but then they would not stick to the conveyor belt...

onCollide thyme collision group changing. thats how that one (sucky) laser thing i made works

Offline

 

#6 2009-05-30 13:11:21

lollerman
Post Manic
From: Finland>Funland>Phunland!
Registered: 2008-10-24
Posts: 921
Website

Re: Add attraction distance

changing collisions and stuff doesnt help unless you add custom collision menus or something. it feels as "cheating" if magnets have their own collision group as i like to use as little collision groups as possible. this would allow making some kind of sticky surfaces (2 surfaces have small balls with veryyy little attraction distance so they stick together, small balls because 2 big objects gravity centers are so far from each other)

if you are making game or something then using collision menu changing is ok (its ok always if the magnets are in some normal collision menu or stuff or if the mechanism isnt the scene itself)


qqqqqqqq☻ <--- this is a worm, worms name is bob (of course) help bob to eat the other bobs head ---> ☻

^ that is the signatrue, help signature take over the forums!

Offline

 

#7 2009-05-30 16:05:21

Fourex
Member
From: San Rafael, CA
Registered: 2008-08-13
Posts: 44

Re: Add attraction distance

chronos wrote:

Fourex wrote:

Versieon wrote:

for your marble machine, you can just change the collision of the marbles to something other than the magnet, then they won't be attracted, or vice versa.

but then they would not stick to the conveyor belt...

onCollide thyme collision group changing. thats how that one (sucky) laser thing i made works

i don't know how to use thyme. and even if i did i wouldn't use your suggestion because i like to figure out a problem using only the physics of phun, not scripting anything. its cheating.

Last edited by Fourex (2009-05-30 16:05:39)

Offline

 

#8 2009-05-30 20:51:11

Conundrumer
Posting Lord
Registered: 2008-03-22
Posts: 1584

Re: Add attraction distance

The mass of the object determines the attraction strength. The attraction slider determines how far reaching the attraction is.

Offline

 

#9 2009-05-30 21:51:08

ChaDonSom
Very Active Poster
From: ÑÇ, ÜŠÅ
Registered: 2008-10-29
Posts: 477

Re: Add attraction distance

this idea will probably be implemented, but with the release of beta 5, this was just a new tool.  It's not fully developed yet, emil was probably just putting it in to see how well it would work, and then with the next update, seeing how well everyone liked it, he'll probalby add more options to it.  the same goes for the "orbit" option.

Offline

 

#10 2009-05-30 22:56:57

chefsbrian
Post Manic
Registered: 2009-03-07
Posts: 761

Re: Add attraction distance

orbit option was a great addon. if emil wanted that to be in, imagine what else could happen? although, we could also just use a stickyness property for making items attach to eachother. im good for this option. although i find when it comes to making mechanical systems, linear attraction is more easily predicted.


Captian Janeway had professionals design her ship, which lead to it spawning shuttles out of nowhere. follow her example.
(Animated gif removed - I hate those things /emilk) - does that mean no retarded lama to take its place? sad
imagine this flying at you at 250 miles per hour.
http://internets.tj09.ath.cx/image/1347.png

Offline

 

#11 2009-05-31 06:28:57

lollerman
Post Manic
From: Finland>Funland>Phunland!
Registered: 2008-10-24
Posts: 921
Website

Re: Add attraction distance

Conundrumer wrote:

The mass of the object determines the attraction strength. The attraction slider determines how far reaching the attraction is.

both mass and attraction slider change only the attraction forcs, linear and quatradig or what it was somehow change how attraction grows while coming closer.


qqqqqqqq☻ <--- this is a worm, worms name is bob (of course) help bob to eat the other bobs head ---> ☻

^ that is the signatrue, help signature take over the forums!

Offline

 

#12 2009-05-31 06:32:16

Nxdt
Post Addict
From: Scotland!
Registered: 2009-03-24
Posts: 698

Re: Add attraction distance

Linear is constant attractionbut quadratic is like a curve, the closer you get, the stronger the force.


http://i540.photobucket.com/albums/gg327/ioncann0ns/ubd9085-1.png   big_smile               
http://miniprofile.xfire.com/bg/sh/type/0/nxdt.png

Offline

 

#13 2009-05-31 13:01:44

RA2lover
Post Addict
From: Brazil
Registered: 2009-02-08
Posts: 681

Re: Add attraction distance

lollerman wrote:

like real magnets wont pull a nail to it from distance of 10 meters but if its 5 mm from it, you almost cant pull it off the magmet.

some kinds of magnets can(LHC ripoff)

Offline

 

#14 2009-05-31 13:50:36

Physicsguy
Newtonator
From: A Life Sustainable Atmosphere
Registered: 2008-10-24
Posts: 914
Website

Re: Add attraction distance

Good idea!


http://i43.tinypic.com/zlp8b9.jpg << Magic Sig!    Click below to go to PGCode, my sub-site dedicated to all code!
http://tinyurl.com/ms5k47http://i26.tinypic.com/s6nfv4.jpg
^Click to level up my license!^

Offline

 

#15 2009-06-01 00:00:40

Antotabo
Respected Member
From: Québec/Canada
Registered: 2008-03-09
Posts: 161

Re: Add attraction distance

This has been suggested at least 4 times and it never gonna happen. It is completely against laws of physics because attraction affect things to an infinite distance. The force is allways acting but it is regressing by the square of the distance (quadratic falloff). You have to know the difference between attraction and magnetism. Attraction is caused by mass, like the attraction of the Earth (gravity) and magnetism...magnet. The forces of a magnet , they regress by cubic of the distance. But in phun, for now, we can't put cubic regression On, and I Hope it will in next beta: then it would behave more like magnet.       

In conclusion, we need cubic regression, not a distance slider.

Last edited by Antotabo (2009-06-01 00:21:07)


http://i269.photobucket.com/albums/jj79/antotabo/Signaturefinal450.jpg

Offline

 

#16 2009-06-01 17:53:57

Antotabo
Respected Member
From: Québec/Canada
Registered: 2008-03-09
Posts: 161

Re: Add attraction distance

It seems like I'm closing all the suggestions I reply. :p


http://i269.photobucket.com/albums/jj79/antotabo/Signaturefinal450.jpg

Offline

 

#17 2009-06-01 21:01:33

chefsbrian
Post Manic
Registered: 2009-03-07
Posts: 761

Re: Add attraction distance

well, air-friction motors also go against physics, same with zero-friction mechanisms, but we use those. personally, i think a small radius, high intensity magnetic field would be of incredible use for anything ranging from a floating platform to a guns magazine holder, or firing mechanism. new stabilizers could be built, whole new concepts for thrust systems would become possible, even simulating limited gravity for people who make space ships.


Captian Janeway had professionals design her ship, which lead to it spawning shuttles out of nowhere. follow her example.
(Animated gif removed - I hate those things /emilk) - does that mean no retarded lama to take its place? sad
imagine this flying at you at 250 miles per hour.
http://internets.tj09.ath.cx/image/1347.png

Offline

 

#18 2009-06-01 22:48:55

Conundrumer
Posting Lord
Registered: 2008-03-22
Posts: 1584

Re: Add attraction distance

lollerman wrote:

Conundrumer wrote:

The mass of the object determines the attraction strength. The attraction slider determines how far reaching the attraction is.

both mass and attraction slider change only the attraction forcs, linear and quatradig or what it was somehow change how attraction grows while coming closer.

I have no idea what the hell you just said.

Air-friction motors and zero-friction mechanisms defy the laws of physics because WE MADE IT LIKE THAT (inputted the values for amount of friction).
Phun isn't suppose to have any sort of unnatural forces.

However, Antotabo makes a good suggestion, if what I said before is wrong. In addition to that, I would also like the option for bipolar attraction modes instead of the current monopolar attraction, although this has been suggested multiple times

Offline

 

#19 2009-06-01 22:50:16

Antotabo
Respected Member
From: Québec/Canada
Registered: 2008-03-09
Posts: 161

Re: Add attraction distance

To chefsbrian:  Read a second time and think. Cubic regression would absolutely create the phenomena you describe; limited distance. Example:
   
   100.0 lb = 1 inch
     12.5 lb = 2 inch
       3.7 lb = 3 inch   
        0.8 lb = 4 inch

This is the way it should be.

Last edited by Antotabo (2009-06-01 22:52:36)


http://i269.photobucket.com/albums/jj79/antotabo/Signaturefinal450.jpg

Offline

 

#20 2009-06-01 22:59:32

chefsbrian
Post Manic
Registered: 2009-03-07
Posts: 761

Re: Add attraction distance

yes, i understand the concept, but there are two other factors to account for. first off, which would be easier for emilk to code, Cubic Regression, or a distance limited. and secondly, there is a large portion of younger children using phun, which for the most part, would struggle with the concept.

but having cubic regression would be better for the physics accuracy.


Captian Janeway had professionals design her ship, which lead to it spawning shuttles out of nowhere. follow her example.
(Animated gif removed - I hate those things /emilk) - does that mean no retarded lama to take its place? sad
imagine this flying at you at 250 miles per hour.
http://internets.tj09.ath.cx/image/1347.png

Offline

 

#21 2009-06-01 23:10:02

Antotabo
Respected Member
From: Québec/Canada
Registered: 2008-03-09
Posts: 161

Re: Add attraction distance

for the coding part, the only thing Emilk have to do for cubic regression is to replace a 2 by a 3 in is current quadratic simulation.


http://i269.photobucket.com/albums/jj79/antotabo/Signaturefinal450.jpg

Offline

 

#22 2009-06-03 00:29:07

Conundrumer
Posting Lord
Registered: 2008-03-22
Posts: 1584

Re: Add attraction distance

For the children part, I highly doubt they even understand "linear" and "quadratic", and probably EVERYTHING ELSE in ADVANCED MODE.

Advanced mode: not suitable for children
ಠ_ಠ

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

Phun and Phunland.com is copyright of Algoryx