Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Hinge Joint does not work with gravity

Author
Message
MarcoBruti
13
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 19th Dec 2016 22:31
Hi,
for my 3D pinball, I am trying to implement a gate rotating around the Y axis.
I have literally copied the sample code of the 3D demos:

where .elementsID[1] is a vertical bar which is overlapped to the right end of the gate, while elementsID[0] is the gate itself.

In the demo there is no defined gravity, in my code I have defined a gravity
Set3DPhysicsGravity(0,-5,-1.5)

What happens is that the gate does not stand up and rotate around the Y axis, but leans down as it were attracted by gravity, and it stay sticked to the Y axis only in 1 point.

Where am I wrong?
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 21st Dec 2016 01:46
Quote: "In the demo there is no defined gravity, in my code I have defined a gravity "


Read the help files. Gravity by default is set to 0.0, -10.0, 0.0.

Try posting a runnable demo so we can see what is happening.

The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-11-24 22:56:53
Your offset time is: 2024-11-24 22:56:53