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 / More collision problems! (First Person)

Author
Message
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 22nd Jul 2010 04:28 Edited at: 22nd Jul 2010 09:48
So i have a camera thats first person on a character and i have a collision code but when i hit the block its SO obvious that the character hit it, then it lags the game a bit afterwards. you may have to replace load object with your character or something
My code:

thanks guys!
windows vista
dbpro 7_4
Manufacturer TOSHIBA
Rating 4.2
Processor Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz 2.00GHz
Memory(RAM)2.00GB (i can hold 10gbs )
System Type 32-bit operating system

NOW USING SPARKIES DLL TOO

I want coke, not Pepsi!
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 22nd Jul 2010 07:51
How didn't Sparky's DLL work? I always recommend it over the built-in commands because anything is so much better than them.

Also, I really recommend updating DBPro to the latest version. That might be where some of your issues are coming from.

CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 22nd Jul 2010 08:32 Edited at: 22nd Jul 2010 09:47
FIXED sparkys DLL and upgraded to v74
how do i do that with sparkys dll? and please dont post to a 2 hour long tutorial...

I want coke, not Pepsi!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Jul 2010 14:50 Edited at: 22nd Jul 2010 14:51
Quote: "and please dont post to a 2 hour long tutorial..."

gee, how polite...

The search button provideth again:
http://forum.thegamecreators.com/?m=forum_view&t=89539&b=1

If you don't have two hours to waste you are using the wrong software...

Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 22nd Jul 2010 15:43
You didn't need Sparky's... Use it if you want, but your problem was the near clipping plane of your camera. The DBP collision detection is accurate-- too accurate. You need to have more space between the camera and anything you collide with.
What's with this:

I understand that you want to use the Z-axis as up/down, but the +5's.... What are you wanting to accomplish with that? If you are making a first-person game, eventually you will want to turn the camera. The +5's will have an offset effect. Take out the +5's and try this for collision:


The fastest code is the code never written.
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 22nd Jul 2010 21:26 Edited at: 23rd Jul 2010 05:36
Thanks but is there a way I can get it to work with the +5s? because I want my camera at my players head, not in the middle of his body.

woah freaky i must have had a dream sparkys DLL didnt work, I was just about to edit my post to say it didn't

Anyway what about ramps?? with that code a ramp wouldn't really work.

Anyone....please???? have a free afro guy

I want coke, not Pepsi!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Jul 2010 10:53
Post your sparky's code and I'll show you what's wrong with it. I use it a lot...

Thanks for the afro guy, here's a little penguin

CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 23rd Jul 2010 20:18


I didnt use any sparkys but I can, I need the camera higher on the player (don't NEED but would help)
And how would I do ramps or jumping with this code? I would prefer ramps.

I want coke, not Pepsi!
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 23rd Jul 2010 23:34
For the right position of the camera use this code.


If it hasn't exploded yet, I haven't touched it.
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Jul 2010 01:05
ok, thats not a big problem, but I need a link to a jump or ramp tutorial, can't find one that explains it good.

I want coke, not Pepsi!
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 25th Jul 2010 00:34
BUMP

I want coke, not Pepsi!

Login to post a reply

Server time is: 2026-07-25 07:01:57
Your offset time is: 2026-07-25 07:01:57