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 / Request for command in future upgrades

Author
Message
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 9th Sep 2003 01:10
I thought that a command like intersect object() that returns, somehow, the normal of the polygon it intersects (DBPro has a vector type doesn't it?), would be good command. That way you could do accurate all round sliding collision without having to have 360 intersect object() commands to cover all angles. You could use 4 intersect object commands (at 90 degree angles) and if one of them intersects a polygon, you could move the character object along the normal of the polygon, which would simulate sliding collision.

It would also be useful for things like bullet ricocheting (excuse my spelling) as you could rebound the bullet over the normal of the polygon.

Forgive me if there is already a command like this, I'm just suggesting as I have now ordered DBPro, and I think it would be a good idea, does anyone else?

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Xander
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 9th Sep 2003 06:55
It totally agreee. I really want this command for another reason. To be able to place damage marks on walls at the correct angle. It would make it alot simpler.

Another Command: .obj file loading PLEEEEASE!!!!!!

Xander - Bolt Software

"Make your words soft and tender, you may have to eat them tomorrow" -Anonymous
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 9th Sep 2003 19:40
I never thought of that use. Anyone else?

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Sep 2003 01:41
From the Darkbasic Pro help files:

Quote: "INTERSECT OBJECT
This command will return the distance to the point of intersection between two
coordinates, in reference to the specified object. Use this command to project a
line from your current position to a destination to determine whether a collision
will occur with an object. Ideal for bullet calculations and fast manual polygon
collision.

SYNTAX
Return Float=INTERSECT OBJECT(Object Number, X, Y, Z, ToX, ToY, ToZ)"


Not quite what you're looking for I think, but if you took the time you could use it to set up a function that would do it for you, using 4 small objects and seeing if they touch the wall, and you could derive the angle from that.

Cheers,
Kentaree

I would be unstoppable if I could just get started...
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 10th Sep 2003 10:55
If it was done as an actual command it would be more accurate and faster.

I did mention intersect object(), and it's not the command I want, but something like it.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM

Login to post a reply

Server time is: 2026-07-25 08:12:03
Your offset time is: 2026-07-25 08:12:03