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 / Fix rotation on certain axis

Author
Message
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 30th Mar 2010 16:20
I'm having a problem with fixing an axis so that it doesn't rotate on it ive tried


But that seems to stop the gravity from working properly as it keeps updating. Has anyone got any ideas on how to fix an object on certain axis with out messing up the gravity?

Thank you.

life is short but so am i
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 30th Mar 2010 17:02 Edited at: 30th Mar 2010 17:04
Hi,

The "Phy set rigid body rotation" command isn't applying a simulated force to an object, it pretty much takes the object out of the simulation and makes it rotate. If used constantly it doesn't let the object see gravity.

What exactly are you wanting to do? Do you mean on collision you don't want it to react on all axis? I'm not sure how that'd be done using DarkPhysics...
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 30th Mar 2010 17:05
I have like a 2d Positioned camera so everything looks flat i have a charecter and movement just cause i don't want it to rotate off an axis so it doesn't move say towards the screen or any other angle cause its 2d(2d in a 3d world).

thank you

life is short but so am i
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 30th Mar 2010 17:33 Edited at: 30th Mar 2010 17:40
Ahhh right. You might want to make the physics try its best to keep it from moving on a particular axis by compensating for any unrequired movements with the "Phy Set Rigid Body Angular Velocity" command. I did something similar to make a turret on a vehicle controllable. Basically even if it's knocked very hard and knocked off target its quickly moves back. The problem is I used EZ rotate and DarkPhysics for that so my code might not work so well if you don't have EZ rotate.

I needed a bit of help for this on this thread:

http://forum.thegamecreators.com/?m=forum_view&t=157259&b=30
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 30th Mar 2010 18:38
Thank you

life is short but so am i
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 30th Mar 2010 18:45
No problem, do you use EZ Rotate? If so I'm having problems getting this to work on the X Axis for the weapon mounted on the turret. Any ideas would be appreciated I need to work this out to move my game on to the next stage really. This is an EZ Rotate issue though
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 30th Mar 2010 23:23
Nah man i'm still just on dark physics and dbpro and can't really find much on the situation

life is short but so am i
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 30th Mar 2010 23:34
have a look at this demo, in one part it shows how to stop a part from moving left right but still move back and fore.

run it and see.



Dark Physics makes any hot drink go cold.
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 31st Mar 2010 00:15
If its the code
I just tried it with no effect but i'm most probably wrong.

Thank you.

life is short but so am i
NickH
16
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 31st Mar 2010 02:37
z i l c h vortex

Hehe no problem...it was a long shot. Goodluck on your quest!
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 31st Mar 2010 23:04
I'm not even sure if there is a command that can do this :/

life is short but so am i
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 1st Apr 2010 03:56
I've figured it out. what i've done is created a second block the block is now the control block because ive setup a cylindrical joint between both of them. This sorts out the problem.

life is short but so am i

Login to post a reply

Server time is: 2024-11-24 15:56:56
Your offset time is: 2024-11-24 15:56:56