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 / Help using Sparky's Collision

Author
Message
Movian
16
Years of Service
User Offline
Joined: 5th Mar 2008
Location:
Posted: 10th Mar 2008 03:10
Hi,
after doing some searching for help on collision detection. I found many posts suggesting Sparky's Collision. So i have installed it and it seems to be running correctly. However i am having some troubles implementing it. I have created some Terrain with a skybox, textured the terrain and given it some detail. I have also created a sphere object and given control to the up and down keys. However i am having problems detecting collision between the sphere and the terrain object... i have included the snippets from the applicable cpp files.

Main.cpp

Ball.cpp

Environment.cpp


MovCon is just some simple mouse click move code.

the result is i get a 1 on the collision detection for both objects at all times weather they are actually colliding or not.

Any help apriciated
Movian
16
Years of Service
User Offline
Joined: 5th Mar 2008
Location:
Posted: 10th Mar 2008 08:26
ok after many hours perseverance i figured out i was using the wrong command! 'DOH!!

At any rate i have now been to set it up so that my object changes colour when it dtects a collision and change direction. (based on a tutorial i found on the forum.) however the ball still does not seem to bounce correctly...
again any help would be apriciated .
Main.cpp

Environment.cpp


Ball.cpp

Login to post a reply

Server time is: 2024-11-20 05:41:04
Your offset time is: 2024-11-20 05:41:04