Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: dudebxl on January 02, 2016, 01:00:57 PM
-
A bit of fun with creating fake gravity!!
I cannot explain how to use because it has many features. The filters works in this order useOverlapSphere(if on) then tag(if on) then layer(if on). Or tag then filter(if on). You should always have minimum tag on or useOverlapSphere on.
Attached are examples of what you can do at runtime by playing with the variables. (2 basic setups + 2 complex // link: http://giphy.com/gifs/l3nW2ILHGN8XlVzUY & http://giphy.com/gifs/l0GRk8bJQJ6NSF008) - most cubes had a mass of 1 and some of 10.
on ecosystem or https://snipt.net/dudebxl/
;D
-
Hi, I have been unable to get this script to have any effect. Is it still functional? If so, how do I make it have an effect on my rigidbodies? I have a rigidbody at the center of a planet set as gravity source but it has no effect on my other rigidbodies in the scene.
-
I will check with PM 1.8.x + Unity 5 and let you know.
It works, just make sure they all have rigibodies and play with the settings, maybe increase the gravity force...
-
OK, 2 month on and have yet to ever get this to have any effect whatsoever an any rigid body in any scene.... is there any chance of getting instructions on what all the settings actually mean? I'm sure it's a great plugin but at present you are the only person who knows how to use it.... or maybe a sample scene with it working?
-
OK. so I've managed to get it to work in a completely fresh scene with small objects only, but still nothing when using a very large "planet" to attract small objects. Is there a maximum distance from the rigidbidy that this will work? I've set the sphere size to include all the rigid bodies but nothing is happening to them.
-
Mmmm let me think about it..
-
breakthrough! I needed to set the parent rigidbody to have a really, really massive mass. Now it works. I assumed it was a simulated force, not dependant on the mass of the "planet" body.
-
OK, next issue... It looks like the gravity is having a much stronger effect on objects with a high mass compared to objects with a low mass which isn't how gravity works. Gravitational pull should effect all objects exactly the same regardless of their mass. Is there a setting to make it function like real gravity?
In short, the gravity should pull just as hard on a rigidbody of mass 1 as it does on a rigidbody of mass 100.
-
It is more of a toy action: Can you attache a screen shot of the action stetting your are using so i can try to reproduce it on my side.
-
Ahh I see, I thought it was a gravity simulation, not attraction based on mass.
Now that I look at your links in the original post I see that it is happening in your examples. The cubes with mass 10 in your example should move exactly the same as the cubes with mass 1. The pull of gravity is identical on all objects regardless of their mass.
I've found that if I launch a spacecraft away from a planet then turn off the thrust your gravity model will slow it down much quicker if it has a high mass... whereas any object should slow down at the same set rate.
This might be a flaw with unity possibly, not sure how realistic the default gravity is but I had thought force type "acceleration" ignored mass.
-
Is there a way to use an action to disable the gravity effect? I only want it to pull objects for either a certain time, or until the objects hit the ground prior to hitting the gravity object.
-
Hi,
use the action "Use Gravity" on your object rigidbody to turn its effect on or off.
Bye,
Jean