Size and Gravity Question
by rennie moffat · in iTorque 2D · 08/22/2011 (9:23 am) · 8 replies
I have a object, which for longest time was 16x16. I have changed the objects size to 64x64. Applying the same gravity effects that I had applied to the older, smaller version of the object, which worked great, the new effects are now off.
Picture the generic, red Angry Bird, vs the big HUGE red Angry Bird. The big one, bounces around like a beach ball. Not what I want. It alos, tends to "Float" more then fall after bounces.
The objects, in creation are created like this. I have played with may settings but can not nail the same effect.
Picture the generic, red Angry Bird, vs the big HUGE red Angry Bird. The big one, bounces around like a beach ball. Not what I want. It alos, tends to "Float" more then fall after bounces.
The objects, in creation are created like this. I have played with may settings but can not nail the same effect.
%this.object = new t2dStaticSprite(object)
{
scenegraph = $X.scenegraph;
imageMap = "xxxImageMap";
frame = "1";
mUseSourceRect = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
class = "chipsChipClass";
layer = "11";
Position = %chipLoadPos;
size = "32 64";
usesPhysics = "1";
CollisionActiveSend = "1";
CollisionActiveReceive = "0";
CollisionPhysicsSend = "0";
CollisionCallback = "1";
CollisionCircleScale = "0.25";
CollisionMaxIterations = "3";
CollisionDetectionMode = "CIRCLE";
CollisionResponseMode = "RIGID";
WorldLimitMode = "BOUNCE";
WorldLimitMin = "-171.993 -1813.661";
WorldLimitMax = "169.314 1556.239";
WorldLimitCallback = "1";
Friction = "0.0";
Damping = "0";
MountOffset = "-0.252 -0.199";
MountOwned = "0";
MountInheritAttributes = "0";
mountID = "41";
mountToID = "40";
_behavior0 = "xxxBehavior";
group = 27;
};About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#2
it has nothing to do with angry birds. just, my unwanted result is similar to how, when the big bird, kind of seems to float more.
what i am doing is simply have an object, where i apply a constantForceY to it. I have it working fine. However, today I decided to change the imageMap and as a result, its size is much larger. I create it in the exact same manner, apply the same constantForce value but what I get is something that falls like a beach ball, not a baseball.
??
08/22/2011 (9:57 am)
no no.it has nothing to do with angry birds. just, my unwanted result is similar to how, when the big bird, kind of seems to float more.
what i am doing is simply have an object, where i apply a constantForceY to it. I have it working fine. However, today I decided to change the imageMap and as a result, its size is much larger. I create it in the exact same manner, apply the same constantForce value but what I get is something that falls like a beach ball, not a baseball.
??
#3
After you set it to 0, you'll probably have to tweak the mass to be the right value for the "feel" you're looking for.
08/23/2011 (10:45 pm)
Check the AutoMassInertia field, if it's 1 it means that the mass is automatically determined by the size of the object. After you set it to 0, you'll probably have to tweak the mass to be the right value for the "feel" you're looking for.
#4
that does not seem to be working. I have played with mass, density, friction and damping. Still it behaves like it is on the moon, not on the earth. One thing that would be useful is if the docs had values for the object fields, so, precisely, what fields have only a value of 0 or 1? which fileds are any number between 0 and 1? and which fields are any value at all.
Having said that, it is a density issue I imagine because, when it is small (the imagemap in size) it works great, but bigger, the less effect a constantForceY has on it.
08/24/2011 (5:05 am)
Thanks David, that does not seem to be working. I have played with mass, density, friction and damping. Still it behaves like it is on the moon, not on the earth. One thing that would be useful is if the docs had values for the object fields, so, precisely, what fields have only a value of 0 or 1? which fileds are any number between 0 and 1? and which fields are any value at all.
Having said that, it is a density issue I imagine because, when it is small (the imagemap in size) it works great, but bigger, the less effect a constantForceY has on it.
#6
Can you provide all the properties we've mentioned in much the same way your original post for where AutoMassInertia = 0 and AutoMassInertia = 1?
08/25/2011 (6:07 pm)
I'll see if I can do a little demo this weekend looking into this.Can you provide all the properties we've mentioned in much the same way your original post for where AutoMassInertia = 0 and AutoMassInertia = 1?
#7
I was playing with it again, just now actually. It seems the problem may have been in my mass and density values. I was giving them values (in my frustrating tests) like mass == 10 or == 1000 and so on. I believe that mass and density (at least I got more accurate results, not perfect yet, but more accurate) with values like mass == 0.1 and density == 0.3, so between 0 and 1.
?? not sure if this is true or not.
I was flipping between autoMassInetia being on and off, so no recorded results at the moment. I will keep you posted. At the moment, my relevant fields are...
Friction = "0.7";
Damping = "1";
density = "0.7";
mass = "0.5";
AutoMassInertia = "0";
As I say it is still not right, but closer. I think / hope, if I play with these just enough I might get it.
08/25/2011 (6:18 pm)
Thanks David, I was playing with it again, just now actually. It seems the problem may have been in my mass and density values. I was giving them values (in my frustrating tests) like mass == 10 or == 1000 and so on. I believe that mass and density (at least I got more accurate results, not perfect yet, but more accurate) with values like mass == 0.1 and density == 0.3, so between 0 and 1.
?? not sure if this is true or not.
I was flipping between autoMassInetia being on and off, so no recorded results at the moment. I will keep you posted. At the moment, my relevant fields are...
Friction = "0.7";
Damping = "1";
density = "0.7";
mass = "0.5";
AutoMassInertia = "0";
As I say it is still not right, but closer. I think / hope, if I play with these just enough I might get it.
#8
*EDIT* Whoops wrote this post in the middle of work and I think it came off terse. If you have damping enabled that will certainly impede your object. You should set it to 0.
08/28/2011 (6:50 pm)
Quote:Damping is a percentage value of the amount of linear and angular velocity the object loses per second. A damping value of 1.0 will cause the object to be completely still after 1 second.
*EDIT* Whoops wrote this post in the middle of work and I think it came off terse. If you have damping enabled that will certainly impede your object. You should set it to 0.
Torque 3D Owner Pedro Vicente
Space Research Software LLC
www.garagegames.com/community/forums/viewthread/124440