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 / how to make a rotating platform?

Author
Message
Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 18th Dec 2011 03:45
Hello, I'm trying to make a platform that rotates, but the character controller won't rotate with it, when I tried with a rigid body it would rotate, but at what seemed to be half speed. Any ideas?

Thanks much

MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Dec 2011 04:51 Edited at: 21st Dec 2011 15:42
I dont have an answer for you just yet... but your thread title annoyed me somewhat... as it is not a question and seems like a solution title not a leading question... perhaps ask a mod to edit it... just my view sorry...

[Mod Edit] - Added a '?' to the title to make it clear that it's a question.

Anyhoo When I can if I can get around to it I will try your code... but while writing this... not looking at the code... I remember the chm file showing different connecter types... which did you use?

Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 18th Dec 2011 22:34 Edited at: 18th Dec 2011 22:38
Hey, sorry about the title, I could have worded it a lot better.

Chm file? What do you mean? I think your asking how I connected the platform to a rotate object correct? I did not connect it to anything,

I set the platforms position with...

phy set rigid body position 2, 0, -2, 0

I then set it's rotation as...

rotate#=wrapvalue(rotate# + 0.3)

phy set rigid body rotation 2, 0, rotate#, 0

In the code above I drop a cube on top. It will rotate, but it looks like it's only going half the speed of the platform it is on. And the farther to the edge it is the slower it appears to be going.

Thanks much!
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Dec 2011 22:54
Look in
C:\program files{if your on a 64bit machine its the one that says x86}\The Game Creators\Dark Basic Professional\Projects\Dark Physics\Documentation\

File names:

\Information.chm
\Reference.chm

They are an invaluable read!

I was refering to...

Cylindrical Joints in the Information.chm file under Tutorials.

Its also under Information┬╗Rigid Body Joints

hope this helped.

Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 19th Dec 2011 00:07
I'll read it and see if I missed something. thanks
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 19th Dec 2011 12:43
well I had it so that the character controller would go round with object 2, but as for getting it to move off the box to land on object one was a no go, just can't see how it would possible to make it go, even went to putting this object into the character controller demo which I know works but when I add this it all seem to stop, if I don't run out of hair I might find away of doing it, but I don't hold out much hope of it being found just yet.

Dark Physics makes any hot drink go cold.
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 19th Dec 2011 14:45
well this sort of works, it the character controller demo modified to show this working, only thing I can't work out is why i have to wait for the rotating object to do one rotation before it work right.



Dark Physics makes any hot drink go cold.
Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 20th Dec 2011 01:58
The platform is not going to spin more so as I just want the player to stay in the same spot when it turns, think of it like a train car on tracks.

Just letting you know if this helps
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Dec 2011 02:20
Why not use a transparent plane?

chafari
Valued Member
13
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Dec 2011 14:28
Hi there.
@Shouthside Games
You don't need physics at all for that, as we can use a trick. Take a look to this piece of code...I hope it can help.



Cheers.

Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 20th Dec 2011 16:59
That is exactly what I wanted. Thank you so much dude! ^^
Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 20th Dec 2011 17:36
Hey, after studying the code a little bit I have some questions


Quote: "if object position x(100)<-10 then yrotate object 100,180
if object position x(100)>10 then yrotate object 100,0"

I'm not sure what is really going on. Shouldn't the object "snap" to 180 and 0? Also I experimented on it and added a wrap-value so it span in a circle, and wail it did spin 360 I noticed the platform seemed to be moving in a circle movement. Could you describe a little more how I Can get this to move where I want it to go? I just need it to turn on turns in the track

So basically object/limb 101 is the players position on the platform, and I really am not positioning the player but just moving the limb?

I can do this with two players by making a object/limb 102 and do the same thing, correct?

Thanks for answering my noob questions. You've been a big help.
chafari
Valued Member
13
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 20th Dec 2011 19:12
@Southside Games

This is just the animation condition, something like a boat on water....that's like if I say if object position x>300 then yrotate object 1,180..... I force the object 1 to rotate its angle y when it reaches 180.....it was just the mechanism for the platform movement. If we move the object to another position wherever you want, the limb goes with the object,therefore the player will stay in limb x,y,z position. I'm glad it can help

Cheers.
Southside Games
9
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 21st Dec 2011 16:54
Oohh I see now, so I was right, I mistook object 100 for the platform. I see that now.... feel kinda stupid though. I mean, it was right there >.<

Anyway thanks man. ^^ This is very helpful
johnythomas
7
Years of Service
User Offline
Joined: 22nd Dec 2011
Location:
Posted: 22nd Dec 2011 16:39
This is a wonderful opinion. The things mentioned are unanimous and needs to be appreciated by everyone.

Login to post a reply

Server time is: 2019-09-17 21:45:16
Your offset time is: 2019-09-17 21:45:16