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.

DarkBASIC Professional Discussion / Intersect problem

Author
Message
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 22nd Oct 2003 00:25 Edited at: 22nd Oct 2003 18:31
I'm making a FPS and have made my landscape as .x file.
for my car collision i check the distance between object and groundheigt for each wheel and position them.



first prob is that they return the exact same number so they are always at the same heigt so even if the front wheels are on a hill, the back wheels are hanging in space :/
why is that?

second prob is that if i go up a hill and down a hill it goes reel jerky... how do I fix that?

thanks in advance

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 22nd Oct 2003 18:32
is it possible to use intersect object multiple times in a loop?

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 23rd Oct 2003 19:05
could some1 plz help

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Oct 2003 20:55
You can use intersect object as many times as you want.

As for your problem, your intersect object functions may be starting too close to your terrain object to see it. Try moving your starting point up a bit higher - see the example code I posted for richardneil last night.
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 24th Oct 2003 18:39
Tried that, tried your code, still not working, they go up and down correctly but they stay at the same heigt so when I'm on a hill the wheels on the back are hanging in air. any other taughts?

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 25th Oct 2003 00:45
I hope i understood what you want to acheive...
First of all what you re looking for with your intersect code is the oy1# , oy#2 etc values at the wheels position
therefore you only have to check the x#,z# positions for each wheel
this code:
dis1#=intersect object(1,ox1#,oy1#,oz1#,ox1#,-4,oz1#)
should be:
oy1#=intersect object(1,ox1#,10000,oz1#,ox1#,-10000,oz1#)
and so on..
where 10000,-10000 is the perpendicular line at the wheel position telling you at what height it hits the .x ground..
and thats the height where to place the wheel(s)
how to turn the car body accordingly is another question..not sure if you are working on the wheels as independant limbs, objects or jerarchied limbs..
hope it gives a hint..
cheers
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 25th Oct 2003 03:29
not working eigther, I use 4 dummy objects and 1 car object with wheel limbs, I want the angles to be correct on a hill so i taught up of a system using atan, but my prob is that the all of the 4 dummy objects are positioned at the same height. I really need to get this to work...

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 25th Oct 2003 19:00
Well name a copy of your x landscape as xland.x and try this..
It may not work straightforward with your x landscape because of this height adjusting lines:
h#=xplaneh#-10000
and
leftfronth#=leftfrontisect#-10000 etcc..
in that case tweak that value (-10000) till you get h# printed out correctly

Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 25th Oct 2003 22:57
wow, thats way to much for me, I don't understand that really
could you give me a global list of what you did?

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 26th Oct 2003 12:02
Could you test it?
if you email me here i'll send you the zipped xland.x model and the texture to be included in order to have it working exactly as it does here..
Still i don t get what you are trying to acheive tho..

>>could you give me a global list of what you did?<<
You mean remming the code about what it does..?
If so np..let me know


email:
[email protected]

Login to post a reply

Server time is: 2026-07-26 15:30:47
Your offset time is: 2026-07-26 15:30:47