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 / need help with linear velocity / collisions

Author
Message
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 9th Oct 2008 20:07
need some help here with collisions, in my code and I can`t get my head around it dose any one know about physic collisions?

plus is my code right? I used this line here SPA(c).covx# = CURVEVALUE(PHY GET RIGID BODY linear VELOCITY X (c),SPA(c).wvoax#,0.5) and need to know if I`m being a bit rubbish or not?

here is the code



soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 9th Oct 2008 20:31
this is how I use curevalue.



Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 9th Oct 2008 20:58
HowDo how is your spining top going?

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 10th Oct 2008 00:30 Edited at: 11th Oct 2008 20:51
how do I get 1000 object to collide and give feed back from each collision?

I need to fix this SPA(c).col1 = c or SPA(c).col2 = c so that all object change colour when a collision takes place

here is the code I`ve used so far, how do I fix this?


thanks in advance

Edit

I got the collisions to work like a dream here is the code



soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Oct 2008 18:32
read the physx information chm bit on doing collisions, has as bit on how to check for many objects.

Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 11th Oct 2008 21:15 Edited at: 11th Oct 2008 23:53
I got the collisions to work like a dream here is the code with 1000 object on the go.


soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 12th Oct 2008 18:27
just add some new code above to my last post and thort that I would say be cos I did it as and edit of an old post, and it dose not appear as a new post.

1000 collisions work now with an array you can use it any way you wont, hope this helps out some one.

let me know what you think of this showcase program for multipal collisions, would it make a good help file? and if you use it what did you use it for?

if any one has a way of making it better then let me know and I`ll add it, a bit of code posted would help to.

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Oct 2008 18:39
Just thought I give it back to you with the for next re set loop put in the another place, and see how much faster it is, now its not doing a 1000,s loops each loop.



Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 12th Oct 2008 18:51
yer I did it again I keep fogeting to delete things like that, thanks HowDo

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Oct 2008 18:56 Edited at: 12th Oct 2008 19:06
change this

if a > 0 and b > 0 and a < 1001 and b < 1001 and (SPA(a).col1 = 0 or SPA(b).col1 = 0)

to

if a > 0 and b < 1001

change a bit more removed things that did not seam to do anything .



Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Oct 2008 19:17
pop this one in and see what happens


Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 13th Oct 2008 16:21
@HowDo
I like what you did, its the nuts lol.

that just gave me an idea for some thing, do you mind if I test that out on my spinning top program? I think it would work better than PHY SET RIGID BODY LINEAR VELOCITY of which I was using before.

I`m using my dads pc at the mo, so the that program runs slow, but I`ll test this out on my laptop and run it again.

do you thing that phy add rigid body force would work with some of the code I made to bounce my spinning top a way from each other?

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Oct 2008 16:53
Quote: "do you thing that phy add rigid body force would work with some of the code I made to bounce my spinning top a way from each other?"


sindore it might help, but don't forget when using physX it does for you, so if there no bounce then they did not hit hard enough, Also remember that now objects become like the real thing so they move and bounce like them adding materials to them changes how they behave.

if you took the above code and put it in a close box and turned off gravity then I think it would go mad and the same if it had gravity on.

plus the above code lets you add some of the physX commands and it will show what it does, so when you make something else you'll be able to go AH! that command did so and so just what I need.

Dark Physics makes any hot drink go cold.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 13th Oct 2008 17:11
ok but on my collisions for my spinning top code you said
Quote: "how you've got them spinning and how they wobble the correct way"
, well what I used to do that was a (PHY SET RIGID BODY LINEAR VELOCITY & phy set rigid body angular momentum), what I`m saying is will this work better if I use phy add rigid body force instead? instead of PHY SET RIGID BODY LINEAR VELOCITY?

and if so can I still add

that to phy add rigid body force?

be-cos I think that if I do I may get a better result, have a look at the my spinning top code again and you`ll see what I`m talking about.

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 15th Oct 2008 00:24 Edited at: 15th Oct 2008 00:37
just tested what I was talking about, ok the out come is a bit strange.

HowDo you could be right as always.

here is the out code


soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!

Login to post a reply

Server time is: 2024-09-19 17:31:54
Your offset time is: 2024-09-19 17:31:54