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.

Newcomers DBPro Corner / attach object based on point of collision

Author
Message
orange gandalf
9
Years of Service
User Offline
Joined: 6th Dec 2014
Location:
Posted: 17th Jul 2015 13:08
what i want to do in darkbasic pro is shoot an object at another object which is moving and then attach a third object at the position of collision between the fired projectile and the object in motion.
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 20th Jul 2015 19:21
Could you just hide the third object, make it travel with the projectile (but using the third object for the actual collision check) and then appear where the collision happens?

orange gandalf
9
Years of Service
User Offline
Joined: 6th Dec 2014
Location:
Posted: 21st Jul 2015 08:52
Quote: "Could you just hide the third object, make it travel with the projectile (but using the third object for the actual collision check) and then appear where the collision happens?"


no because i want a number of 3rd objects to appear like making holes in a wall.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Jul 2015 23:45
Why so many coloured Gandalf's around here?

Are you using a physics engine? do you want these objects to be statically attached or flapping about and possibility to become detached?

If only Core Code, take a look at OBJECT HIT and the sample code that comes with it...

For me it took some tweaking to get it working, but then I use my own code to set up my environments now...

Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 23rd Jul 2015 09:37
I am very recluctant to post this old clunky code (2003).
I am sure you can get leaner and more elegant solutions with vectors and face normals detection.
Nevertheless the underneath logic used is still valid IMHO.

Hope it helps.



MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Jul 2015 00:31
Quote: "print " gun angles ""




Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 24th Jul 2015 10:22
LOL
acronym for: gun angle y
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 24th Jul 2015 13:10


When I read that... you should have been in the room, totally made my day hahahaha

Login to post a reply

Server time is: 2024-04-19 03:15:27
Your offset time is: 2024-04-19 03:15:27