About Store Forum Documentation Contact
Donations:
178$/mo



Post Reply 
Different physics in Mobile?
Author Message
kulesz Offline
Member

Post: #1
Different physics in Mobile?
Hi,

I've got the following situation: there's an object (plane), that is flying with a constant speed, by setting its velocity constant:
Code:
actor.vel(Vec(throttle, 0, 0)*matrix().orn());

Then I do a loop: I'm adding a constant torque in z axis:
Code:
actor.addTorque(Vec(0,0, 22)*matrix().orn()*Vec(1,1,1));

The problem is:
On PC the plane does the full loop (360 degree) in about 3 seconds - on mobile phone with Android it takes about 20 seconds or more. There's notthing more on the scene, frame rate is constant 60fps in both cases - movement is fluent and it's not the rendering issue. It's just slower physics, when the code is exactly the same.

What can cause such thing? I tried to set on mobile:
Code:
Physics.precision(60);

But it didn't help.
(This post was last modified: 11-25-2011 06:15 PM by kulesz.)
11-25-2011 06:14 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Different physics in Mobile?
I think your codes are not time delta dependent
also:

physx has actor.maxAngVel
I don't remember but bullet doesn't use this

Windows uses physx
all other platforms use bullet
11-25-2011 07:38 PM
Find all posts by this user Quote this message in a reply
kulesz Offline
Member

Post: #3
RE: Different physics in Mobile?
So, adding 22Nm of torque in PhysX and Bullet results in 2 different actions? Thats kind of nonsense, because it makes one of the engines completely unreliable.
11-25-2011 08:38 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Different physics in Mobile?
I think your codes are not time delta dependent:
actor.addTorque(Vec(0,0, 22)*matrix().orn()*Vec(1,1,1));
11-26-2011 01:57 AM
Find all posts by this user Quote this message in a reply
kulesz Offline
Member

Post: #5
RE: Different physics in Mobile?
But isn't the addTorque time independent? (I'm adding the final amount of torque, that affects the actor in current time, not the delta)
Doing:
Code:
actor.addTorque(Vec(0,0, 100*Time.d())*matrix().orn()*Vec(1,1,1));

Doesn't helped, two planes are doing loop in totally different times with the same FPS (mobile is just rotating slower, thus it's loop has greater radius). Rest of code is exactly the same (actually there's nothing more than loading world).
(11-25-2011 07:38 PM)Esenthel Wrote:  physx has actor.maxAngVel
I don't remember but bullet doesn't use this

Actually the movement on mobile is slower, so it shouldn't have any meaning.
(This post was last modified: 11-26-2011 08:10 PM by kulesz.)
11-26-2011 07:58 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Different physics in Mobile?
angular damping affects orientation changes
maybe it's differently calculated on physx/bullet
11-28-2011 08:04 PM
Find all posts by this user Quote this message in a reply
Post Reply