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.

Code Snippets / Bulletholes on mesh

Author
Message
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 15th Jan 2004 21:33 Edited at: 16th Jan 2004 01:05
This is just some code I made for a friend of mine who wanted to make a FPS with bulletholes. I didn't use the intersect object command, but I am wondering if it's possible with that command considering you don't know a thing about the poly you intersect with, or do you? (I mean how do you rotate the bullethole plain properly without that info). I though that this might be useful to someone, so I posted it here. Plz tell me if you know a better method, I'd like to know too.

Use the mouse to move around and press space (not hold) to shoot.

http://www.dannywartnaby.co.uk/rgt/attachments/bulletholes.rar
or
http://www.dannywartnaby.co.uk/rgt/attachments/bulletholes.zip

Kevil
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 16th Jan 2004 01:39
Thanks Kevil, Im sure this will resolve many many many questions to come

Thanks for all your great coding

RPGamer


We need help! Email us! join@eternaldestinyonline.com
Xanatus
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Germany
Posted: 16th Jan 2004 21:20
d-man wrote that a long time ago, a method, which is using the intersect object command...



kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 16th Jan 2004 22:23
That's not really the same. That code will only work on a box like that. If you use it on anything else, the holes won't be rotated correctly. (try changing the box into a sphere)
That's exactly why I didn't use the intersect object command.

Kevil
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 17th Jan 2004 11:45
great stuff! although i did find that when i put the hole size up to 10, firing two bullets in nearly the same place causes some dodgy flickering effects


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 17th Jan 2004 13:27
@Kevil

That's some impressive but seriously obfuscated code.


BlueGUI Plugin:http://blue.robert-knight.net / BlueIDE http://blueide.sf.net-Free Replacement editor for DBPro
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 17th Jan 2004 23:42
Obfuscated? Whats that mean o_o


We need help! Email us! join@eternaldestinyonline.com
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 18th Jan 2004 00:02
very very cool, kinda complicated but goog job
could you make a function of it? would be easier to use then



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 18th Jan 2004 02:50
Yeah, I think I could, when I got the time. (which is not this week)

And the code only looks complicated. It's your basic line/plane intersection and point in triangle code. My own version of the intersect object command. Only now I know which poly has been hit and I have the normal data of that poly, which makes it easy to place bullethole planes.

Kevil
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 18th Jan 2004 14:23
I know how you did it, not because of your code but I tought of doing it this kind of way to, just never actually tried it.



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb

Login to post a reply

Server time is: 2024-11-24 00:42:34
Your offset time is: 2024-11-24 00:42:34