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.

Dark GDK / Camera <-> Objects SC collision problem

Author
Message
replax
15
Years of Service
User Offline
Joined: 25th Oct 2009
Location:
Posted: 25th Oct 2009 18:41
hi,

after reading all the tutorials that come with the dark gdk and some others, i started to create a simple fps game.
now, ive got a terrain loaded (the one included in the tutorial with adjusted height etc.), a weapon locked onto the camera and a 3d monster standing on the terrain. ive also got the movement done (arrow keys + mouse). now ive included sparky's collision, i did set up the collision for the monster and the terrain correctly but i dont know how to "enable" the collision for the camera and how to add "gravity". i have checked sparky's examples that come with the dll but i dont really get it.
so basically, i want to know how i can make the camera collideable using sparkys collision and not the dbAutomaticCameraCollision (at least for my experience that doesnt make it collide with other "sparky" objects) and how i can setup a gravity for objects and the camera on a terrain.

regards,

replax
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 25th Oct 2009 22:47
As far as the camera 'collision' im not sure about , but the gravity is in the sliding demo

if(You.AddCode.toPost)TGC.Users.CanHelp = true;
else return NoCodeMessage;
lil marioman
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: Canada
Posted: 26th Oct 2009 01:05
You could make a sphere and set it up for collision. Then, just position the camera to the sphere's position every loop.

And as SFCBias said, the gravity is in the sliding demo.



heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 26th Oct 2009 01:11
If you want you can take a look at this:
http://forum.thegamecreators.com/?m=forum_view&t=156481&b=22

Your bedtime story is scaring everyone
If found my very own Fail!: http://cheezburger.com/View.aspx?aid=2712171776
replax
15
Years of Service
User Offline
Joined: 25th Oct 2009
Location:
Posted: 30th Oct 2009 17:00
hi, thanks for your tipps!!

for now, i tried both, the sphere around my camera and weapon and the movement that heyufool1 posted, it doesnt work properly yet tho. but it is really nice!
are there any disadvantage if u just use a sphere? and how is it done in professional games (i suppose they got a camera collision or a body as a player but the dark engine doesnt have those features?)
and i noticed that heyufool1's solution is using a sphere as well, so are basically nearly all solutions using spheres/cubes etc?

regards

Login to post a reply

Server time is: 2024-11-20 11:48:03
Your offset time is: 2024-11-20 11:48:03