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 / briefly does anyone know the object sliding collision thing using get object collision

Author
Message
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 8th Apr 2003 21:34
briefly does anyone know the object sliding collision thing using get object collision please.
I sort of buggered mine up

im looking for the one with

get object collision x()
get object collision x()
get object collision x()

dec somthing
position object x#,y#,z#
you know the one [img][/img]
I have a word of advice...
..don't piss on an electric fence!
AtomR
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 8th Apr 2003 21:57
dec x#,get object collision x(obj_nbr,target_obj)
dec y#,get object collision y(obj_nbr,target_obj)
dec z#,get object collision z(obj_nbr,target_obj)

position object obj_nbr,x#,y#,z#

Is this what you wanted??

Take care
AtomR
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Apr 2003 11:00 Edited at: 9th Apr 2003 11:00
probably, looks like it anyway

thanks

I have a word of advice...
..don't piss on an electric fence!
AtomR
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 9th Apr 2003 17:07 Edited at: 9th Apr 2003 17:21
Remember the object obj_nbr has to have a collision box made with the comand MAKE OBJECT COLLISION BOX with a collision flag of 0.

And the get object collision x/y/z can't be used like I said, it has to be used like this:

collision_x#=get object collision x()
collision_y#=get object collision y()
collision_z#=get object collision z()

dec x#,collision_x#
dec y#,collision_y#
dec z#,collision_z#

position object obj_nbr,x#,y#,z#

The problem to me is how do you know which object's sliding collision data is being returned since you don't specify it in the command. Is it the last object collision has been tested on?

Take care
AtomR
Attreid
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 9th Apr 2003 18:22
with dbp, I cannot use this code, it has a problem
I made a better code (that work without any make object collision box) => you can know which face is hit by your player
http://www.darkbasicpro.com/apollo/view.php?t=8598&b=1

Bu$herie
How many civilians is he going to kill ? he's going to burn in hell, and I hope that his pain will make him inderstand !

Login to post a reply

Server time is: 2026-07-11 02:35:23
Your offset time is: 2026-07-11 02:35:23