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 / DB collision problem

Author
Message
reaper
18
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 28th Jul 2006 05:12
i have a question about collision detection. My collision detection is not working and i cannot figure out why. please help
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 28th Jul 2006 13:52 Edited at: 28th Jul 2006 13:54
There are 2 things you must understand:

1. The purpose of OLDX# and OLDZ# are to store where the camera was before it moved. Then you use X# and Z# to say where it is after it moved.

2. If an object is locked onto the screen using the LOCK OBJECT ON command, it cannot have collision.

3.Because of #2, no collision can occur. You need an object to be where the camera is at all times, that way it can test for collision. All you do is make this object (I made it a sphere) follow the camera around, and when it collides, detect for collision and put it back where it was before it moved.


Anyway, after understanding this, here is your code, edited. You can change the number of the camera object by changing the value of CamObj to something else when you see it say "CamObj=6". The object number is currently 6.



reaper
18
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 29th Jul 2006 01:35
thank you very much
reaper
18
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 30th Jul 2006 20:50
could anybody show me an example of mem blocks that would be very appreciated. i am not sure if i bought the upgrade though but my instruction book has how to use memblocks thanks.

Login to post a reply

Server time is: 2024-09-25 05:29:45
Your offset time is: 2024-09-25 05:29:45