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 / Question about setting up the wheels for cars

Author
Message
Guardian
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 9th Oct 2006 21:21
Hi I was wondering why in all the demo's for the car the car always goes right and left when you set motor force into it. From what I can see of the demo's the camera is always turned at a 90 degrees to give the appearence the car is going strait instead of strafing left and right. Does anyone know how to set it up so it goes strait without forcing the camera to give a different angle. Thank you
DTsine
19
Years of Service
User Offline
Joined: 5th Mar 2005
Location:
Posted: 9th Oct 2006 23:11
Hi,

From all my tests and believe me I have made many !

There is no way to change the initial setup of the car within the physics engine.

For now you are going to have to work round it as far as I know.

Rich
Guardian
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 9th Oct 2006 23:38 Edited at: 9th Oct 2006 23:39
ya I guess , my main problem comes from trying to do bullet code that orients to the vech. For some reason I am able to get the bullet to follow but its always at a 90 degree angle.


If I remove the +90 the model is lined up with the bullets. but your seeing the side of the model. So I was able to rotate the model to face the way I wanted and got the bullets to do the same by doing this.


However when I'm in the range from -90 to 90 the bullets fire in the right direction. When I go out of this range the bullets just go in random directions, anyone have any ideas why?

However if do not use this and line it up, the vech stafes left to righ cause of wheel orientation.
DTsine
19
Years of Service
User Offline
Joined: 5th Mar 2005
Location:
Posted: 9th Oct 2006 23:48
I havent tested this so I dont know if it will work any better.

Instead of getting the angle of the vehicle object it's self then try getting the angle of the limb for the vehicle body.

You might get better results.

Rich
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 10th Oct 2006 00:30
I haven't tested this but can't you just rotate the car 90 degrees then use FIX OBJECT PIVOT and then turn it into a physics object?


DTsine
19
Years of Service
User Offline
Joined: 5th Mar 2005
Location:
Posted: 10th Oct 2006 01:06
@Scraggle

nope that dont work you have to rotate the limbs within the object not the whole object.

Rich
Guardian
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 10th Oct 2006 01:49 Edited at: 10th Oct 2006 01:50
I tried to use the limb, however I can never seem to get it to work. I tied to make a seperate object and let it follow, this does work but its extremly inefficent. I'm not sure of the limb and physic commands clash or not cause it doesn't seem to work. I have tried to use object pivot but the same problem occurs. The objects just fly in seperate directions when past the range of -90 to 90. Attached is a file showing it in a none working state. It will shoot but past those ranges the bullets go off. Hopefully this is gives a clearer picture of the problem. Mouse button 1 is fire, arrows are movement up for acceleration and left and right for turning. down is reverse

Attachments

Login to view attachments
bosskeith
18
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 10th Oct 2006 03:05 Edited at: 10th Oct 2006 03:07
i have successfully got the wheel thing straightened out...the limb you rotate is the root limb of the object...in other words limb 0

doh!! too many forum windows open sorry wrong one

Guardian
21
Years of Service
User Offline
Joined: 30th Sep 2003
Location:
Posted: 10th Oct 2006 04:42
I just tried it, it seems to just completly rotate the model as limb 0 is the main limb root. However it does effect the wheels direction. Did you by any chance add anything else that could have effected it. Thank you.
bosskeith
18
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 10th Oct 2006 06:00 Edited at: 10th Oct 2006 06:01
if you look at the thread i had just posted you will see what i had done to it however i cannot get mine to turn left ... i have tried both auto and manual and neither want to turn left. You also want to keep in mind that your last 2 weels created will be your front wheels.

DTsine
19
Years of Service
User Offline
Joined: 5th Mar 2005
Location:
Posted: 10th Oct 2006 23:08
I also believe that DBP works in radians for its angles.
DTsine
19
Years of Service
User Offline
Joined: 5th Mar 2005
Location:
Posted: 11th Oct 2006 22:32
I could be way off the mark here but without your code I cant test anything so I am guessing but try this line

SHELL(T).Y_ANGLE = OBJECT ANGLE Y(wrapvalue(2))+90

instead of

SHELL(T).Y_ANGLE = OBJECT ANGLE Y(2)+90


Rich

Login to post a reply

Server time is: 2024-11-24 14:43:11
Your offset time is: 2024-11-24 14:43:11