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 / Odd behavior in phy code

Author
Message
DrReaper
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 7th Sep 2009 16:51


This code may be written wrong or it may just be behaving weird. I want to get it to create a sphere and set velocity then make another sphere. It is creating all the spheres and moving them all at once. I get a line of spheres instead of one then another. I tried using the wait command before Next a but it doesn't affect the runtime at all.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Sep 2009 17:14 Edited at: 7th Sep 2009 17:15
its doing extacly what you programed it to do. PhysX builds it all at once then when you run it it works out where all the bits fly.

to do what you want you need to make into a timer code like so



Dark Physics makes any hot drink go cold.
DrReaper
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 7th Sep 2009 20:44
Ok HowDo... Thanks for the tip. I knew where was something I was missing. I am a new to the phy programming.
DrReaper
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 7th Sep 2009 21:11
There are a couple of problems doing it the way you suggest. First if you set the liner velocity in the do loop it will kill the collision detection. Second I am still getting the same problem of it creating all the spheres before moving them and now its ignoring the starting position.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 7th Sep 2009 21:28
if you can or want, can you post all your code and I have look.
Are you hoping to have it so that you press a key and the spheres then shoot out?

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-04-24 18:08:11
Your offset time is: 2024-04-24 18:08:11