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 / DarkPhysics - Set rotation on dynamic object makes it freeze

Author
Message
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Jun 2008 01:15
I would like to know why this has happened.

In version 1.02 (I think, or maybe it was 1.01) you were able to fix the rotation of a dynamic object so it would not rotate along the x or z axis, for example. This was helpful in simulating an UpVector, like we did in Newton.

Now all it does is freeze the object and it's unaffected by gravity or other forces.

I would like to have this function working again, because I think the character controller sucks.

I allways afraided from a clowns. aww..
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 14th Jun 2008 02:46
post the code and I`ll have a look at it

soul sucking devils, twisted body of the damed, slivering slim drips from ever poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!....
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Jun 2008 02:52 Edited at: 14th Jun 2008 03:14
Well, it's an old code that I think I wrote in v1.02.

[link]

See the last post by me.

I've tracked it down to player.dba line 529 (Phy Set Rigid Body Rotation player.ObjID, 0.0, player.yang#, 0.0)

edit:
to compile and run, you need the media (can be found in that same thread, first post) but here's a direct link: [link]

edit2:
actually, try this code: [link]. Don't know why the latest code is so bugged all of a sudden.

I allways afraided from a clowns. aww..
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 14th Jun 2008 03:33 Edited at: 14th Jun 2008 04:12
ok player.dba dose not go to line 529.

did you mean line 259?

I need to know all numbers associated with player.yang#
and should player.yang# not read player().yang#?

would it not have work better as an array instead of a Global value?

I need more info on this to help, I don`t wont to make it worse, lol.

edit
ok I just tryed it with out (Phy Set Rigid Body Rotation player.ObjID, 0.0, player.yang#, 0.0) and it works like a dream.

what are you using this peace of code for?
is it so when you start you not facing the wall?

I`v tryed this Phy Set Rigid Body Rotation player.ObjID, 0.0, 180, 0.0, and it has the same problem, so I think I`m on the right track.
need bed now I have a go in the morning.

soul sucking devils, twisted body of the damed, slivering slim drips from ever poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!....
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Jun 2008 04:03 Edited at: 14th Jun 2008 08:20
Download this: [removed]
That is what I am working with at the moment. It is basically just a rewrite of what I wrote back then. So it is not different from what you downloaded. It's only a bit cleaner and easier to follow with the UDT. (At least in my opinion).

On line 558 in player.dba (Phy Set Rigid Body Rotation Player.ObjectID, 0.0, Player.Ang.Y, 0.0) is the problem.
If I use this command I am unable to move around.
If I remark it I am able to move, jump and whatever. But the dynamic body will roll and slide around causing a lot of distraction to the player.

Previously (on version 1.02 of DarkPhysics) It was possible to have that command in your simulation, and you was still able to walk around and jump and etc.

Quote: "would it not have work better as an array instead of a Global value?"

I don't think it would make a difference. Only I had to write two more characters each time.

Edit:
Quote: "ok I just tryed it with out (Phy Set Rigid Body Rotation player.ObjID, 0.0, player.yang#, 0.0) and it works like a dream.

what are you using this peace of code for?
is it so when you start you not facing the wall?"

Without that it works. With it, it does not work. It is required to have that command to stop the rigid body from rolling around on the x and z axis, which it does when it's not used.

I allways afraided from a clowns. aww..
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 14th Jun 2008 04:19
ok I think I get you now, player.yang# = 4.0, but what dose it = by the time it gets to (Phy Set Rigid Body Rotation player.ObjID, 0.0, player.yang#, 0.0)

need sleep, I have a look when I wake up

soul sucking devils, twisted body of the damed, slivering slim drips from ever poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!....
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Jun 2008 04:27
huh, 4.0?

player.yang# is the Y Angle of the camera. So it's always changing to something inbetween 0.0 and 359.9.

I allways afraided from a clowns. aww..
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Jun 2008 08:19 Edited at: 14th Jun 2008 08:35
I was browsing the DarkPhysics/Ai forums and stumbled upon this thread: [link].

A quote from the update log:
Quote: "The command “phy set rigid body rotation” will now clear angular and linear velocity."


I think I know what I must do now.


Edit:
It worked. Here is what I did:


Finally I will be able to continue working.

I allways afraided from a clowns. aww..
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 14th Jun 2008 10:50 Edited at: 14th Jun 2008 11:19
cool could I have a look at the updated code, so I can see the changes that you`v made?

Quote: "4.0 huh"


sorry I was a bit sleepy, and my brain stated to leek out, lol.

do you mind if a add a link to this post on my Physic & AI challenge?

soul sucking devils, twisted body of the damed, slivering slim drips from ever 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: 20th Jun 2008 21:34
that works well, I will post what I`v done to the code, once I fix my laptop.

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-11-24 23:55:04
Your offset time is: 2024-11-24 23:55:04