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.

Dark Physics & Dark A.I. & Dark Dynamix / Call me thick but I cant figure something out.

Author
Message
Jase
14
Years of Service
User Offline
Joined: 8th Apr 2005
Location: England
Posted: 4th Aug 2006 00:22
Hi guys,

I've been playing with the physics demos and I thought i'de edit the water wheel demo slightly. I wanted to make the ground spin so I put a roate object command in the main loop, nothing happened. Silly me its a static object, so I changed it to dynamic and it just fell. So how do you move/rotate objects without gravity affecting them?
Thanks
Jase

MetalMackey
JerBil
15
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 4th Aug 2006 01:59 Edited at: 4th Aug 2006 02:06
Here is one way. First add a ground plane before you start
physics. The ground plane is an automatic floor and is invisible.
The balls will not have anything to fall off of, though, when they
get to the edge. They will stay on the invisible floor.



Then move the waterwheel up (y) to 8, so it will clear the ground.
Notice where I have put 8 in the positions.



Then turn off physics ( comment it out ) on the original ground box:



Put this in the do loop to rotate the old ground:


Don't forget to change the code back if you want the example to
work as it did before you did this.

Ad Astra Per Asper
Jase
14
Years of Service
User Offline
Joined: 8th Apr 2005
Location: England
Posted: 4th Aug 2006 02:19
Thanks, but I wanted the balls what stay on the ground object to rotate with it. Surely this can be done so you could have floating moving platforms in a game (and objects can react to them).

MetalMackey
Richard Davey
Retired Moderator
17
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 4th Aug 2006 02:29 Edited at: 4th Aug 2006 02:30
Have you tried disabling the effect of gravity on the object in question? I don't recall the function name off-hand, but it's probably something like phy rigid body disable gravity, or something as equally complex

Also bear in mind that if the object is a PHYSICS object, you shouldn't just 'rotate' it. Either apply force to it (to simulate the rotation), or turn it into a kinematic object, and then do it that way.

Bite my shiny metal ass
Xarshi
13
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 4th Aug 2006 02:39
Its phy set rigid body gravity and set it to 0 if you want no gravity.

Woohoo. DP is finally released!
Mike Johnson
TGC Developer
16
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 4th Aug 2006 10:32
The Demos\Rigid Body\Movement demo may be of interest to you. It demonstrates how to move a rigid body around manually. There's also another demo that shows kinematic objects which are great for when you want control e.g. moving platforms, lifts that kind of thing. You can find this demo in Demos\Rigid Body\Kinematic Objects.
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Aug 2006 11:30
IIRC, the waterwheel is not the best example of cylidrical joints. At the time, I didn't realise that revolute joints can rotate 360 degrees (unlike a hinge which has physical constraints). I'll check it out this evening, but you could try changing it yourself to make the wheel more stable.



Jase
14
Years of Service
User Offline
Joined: 8th Apr 2005
Location: England
Posted: 4th Aug 2006 15:34 Edited at: 4th Aug 2006 15:46
thanks for the help guys. Those demos are just what I was looking for, thanks Mike.

Oh before I forget, if you press F1 on the command phy set rigid body gravity the command cant be found error occurs.

MetalMackey

Login to post a reply

Server time is: 2019-07-18 23:58:59
Your offset time is: 2019-07-18 23:58:59