Hinge Constraints going crazy on iPhone

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Hinge Constraints going crazy on iPhone

Postby benitosub » Tue Jun 02, 2009 1:49 pm

Hi,

I'm trying to use a hinge constraint with the iphone sdk of Newton. It works exactly as it should on the simulator, but when I run the same code on the device the hinge constraint just goes crazy and starts spinning out of control (and not on the restricted axis).

Any idea as to what may be wrong ? Anyone experienced this before ? I saw a post from april 2009 by sacrificeman I think, who mentioned a similar problem with ragdolls and constraints acting crazy on the phone but working fine in the simulator. Did anyone ever solve that?

It almost looks as if some force is being initialized to random *, if I don't set the hinge callback the object will sit still but when another object makes contact it goes crazy again... Did I forget to do something ? (I based the code on the joints sample of the sdk).

Any help would be really greatly appreciated as I'm on a very tight deadline to get this to work :(

Thanks a lot to everyone!

Marco
benitosub
 
Posts: 10
Joined: Tue Jan 20, 2009 10:17 am

Re: Hinge Constraints going crazy on iPhone

Postby Julio Jerez » Tue Jun 02, 2009 2:35 pm

Yes it seems something it wrong of the iPhone device library.
I never run it on anything, I am surprise it even worked at all.
However I bought and iPot Touch last week and I am learning the SDK Cocoa Touch.
I think by this weekend I will be ready to make a few functional demos to distribute wit the SDK.
I already have my approval from Mac and I following some tutorial to get acquaintance with Objective C.

can you wait until this saturday? I beleiev I will have a working demo by them.
Are you using Newton latest SDK 2.01?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hinge Constraints going crazy on iPhone

Postby benitosub » Wed Jun 03, 2009 3:50 am

EDIT: Actually I just realised I'm using 2.0, where can I download 2.01 ? Thanks!

Hey Julio,

thanks for the quick reply! Unfortunately I cannot wait until saturday as I need to finish a prototype and present it this week in order to get the contract :S It's really a shame because the rest of the SDK works like a charm ;) I am indeed using the latest 2.01 build, is there any chance this might work with 1.53 ?

I'm trying to simulate a pinball's flipper, so only rotating around one axis (Y) and within certain angles. I guess I could get it to rotate by setting the force and torque callback to not apply any forces, mass to 0, and set the omega by hand, but I would still need a way to instantly stop it when it reaches the angle limit. I quickly tried yesterday to use "freeze" but it seems to freeze all rigid bodies in the scene :p

I'm going to investigate this further and try to come up with a way to fake this without using hinge constraints, but in the meantime if you can think of a way or if you think hinge constraints would work with 1.53 please let me know :D

Thanks!

Marco
benitosub
 
Posts: 10
Joined: Tue Jan 20, 2009 10:17 am

Re: Hinge Constraints going crazy on iPhone

Postby benitosub » Thu Jun 04, 2009 7:09 am

Ok just so you don't lose any sleep over this, I found a way to do this without using hinges and it actually looks better than it did with hinges :) Finished one day early too ;) Newton rocks! Thanks for the quick replies and great work on the sdk!!!

Regards,

Marco
benitosub
 
Posts: 10
Joined: Tue Jan 20, 2009 10:17 am

Re: Hinge Constraints going crazy on iPhone

Postby Julio Jerez » Thu Jun 04, 2009 11:44 am

Ha glad you found a solution.

Anyway this weekend I will still make a legitimate iPhone Newton demos that exposes some more engine features working on in the actual device.
This way next time people get fewer surprises.

I know I can hack a demo in but I rather learn little bit of Objective C in order to make a legitimate proper demo. So far so good.
The good thing about Iphone is that you can count on Constant hardware, as oppose to the Mac and the PC where there are so many variances.

Anyway good look with your next Iphone project.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 8 guests

cron